Spelling Trickery

Posted 7 April, 2006 - 13:41

Transform numerical values into words. Take a look at the following magic (figure 1.0):

Figure 1.0

sql> SELECT sal, TO_CHAR(TO_DATE(sal,'j'), 'jsp') FROM emp;

       SAL TO_CHAR(TO_DATE(SAL,'J'),'JSP')
---------- ------------------------------------------------------------------------------
       800 eight hundred
      1600 one thousand six hundred
      1250 one thousand two hundred fifty
      2975 two thousand nine hundred seventy-five
      1250 one thousand two hundred fifty
      2850 two thousand eight hundred fifty
      2450 two thousand four hundred fifty
      3000 three thousand
      5000 five thousand
      1500 one thousand five hundred
      1100 one thousand one hundred
       950 nine hundred fifty
      3000 three thousand
      1300 one thousand three hundred

14 rows selected.

sql>