Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

How to spell out numeric value in English words by select query. - response (2) by dnoeth

$
0
0

Hi Sai,
"sp" in Oracle is only supported for DateTime, same in Teradata:

SELECT TO_CHAR(CURRENT_DATE,'yyyysp');


 *** Query completed. One row found. One column returned.
 *** Total elapsed time was 1 second.

TO_CHAR(Date,'yyyysp')
-----------------------------------------------------------------
two thousand thirteen

 BTEQ -- Enter your SQL request or BTEQ command:
SELECT CAST(TO_CHAR(CURRENT_DATE,'jSp')  AS  VARCHAR(100));


 *** Query completed. One row found. One column returned.
 *** Total elapsed time was 1 second.

TO_CHAR(Date,'jSp')
---------------------------------------------------------------------
two million four hundred fifty-six thousand four hundred eighty-six

 
Of course you could do some int-to-date calculations to get it for numbers, too.
How many digits do you need?
 
Dieter
Dieter


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>