title: How to retrieve currency amount as words using oracle sql
body: <p>In the below code, I am trying to get the amount in words for the value in the AMOUNT column but can't seem to get it right. Anyone with an idea? Below the CREATE VIEW statement:</p>
  
  <pre><code>SELECT GLR3 AS RECEIPT_DOC_NO,
     GLANI AS ACCOUNT_NUMBER,
     GLSBL AS JDE_NO,
     (SELECT YAALPH FROM PRODDTA.F060116 WHERE YAAN8 = T1.GLSBL) AS STAFF_NAME,
     CASE GLDGJ WHEN 0 THEN TO_DATE (TO_CHAR (1 + 1900000), 'YYYYDDD')         
        ELSE TO_DATE (TO_CHAR (GLDGJ + 1900000), 'YYYYDDD') END AS GL_DATE,
     GLEXA AS NARRATIVE,
     GLLT AS LEDGER_TYPE,
     GLSBLT AS SUBLEDGER_TYPE,
     GLCRCD AS CURRENCY_CODE,
     CASE GLAA WHEN 100 THEN ROUND (GLAA / 100, 2) ELSE ROUND (GLAA / 100, 2)
         END AS AMOUNT,
     (SELECT TO_CHAR(TO_DATE(T1.GLAA,'J'),'JSP')) FROM DUAL) AS AMOUNT_INWORDS         
  FROM PRODDTA.F0911 T1;
  </code></pre>
  
  <p>My code is failing with</p>
  
  <blockquote>
    <p>ORA-00923: FROM keyword not found where expected. </p>
  </blockquote>