Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: NUMBER TO WORDS
In article <022502e0.fbda2274_at_usw-ex0102-013.remarq.com>,
denunez <denunezNOdeSPAM_at_uacj.mx.invalid> wrote:
> I NEED TO KNOW HOW CAN I CHANGE DE LANGUAGE OF THE RESULT OF
> THIS SQL:
> select to_char(to_date(123,'J'),'jsp') from dual RETURNS
> one hundred twenty-three
> I WANT THE RESULT IN ANOTHER LANGUAGE LIKE SPANISH: CIENTO
> VEINTI TRES
> WHAT I NEED TO CHANGE ON THE CLIENT OR ON THE SERVER TANK YOU
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion
Network *
> The fastest and easiest way to search and participate in Usenet -
Free!
>
OK, Here I am again.
According to Oracle NLS documentation (you can look it up on Oracle Technology network), only names of days and months are translated to NLS_LANGUAGE. SP format always returns results in English. So the only way for you to get you result is to convert it using something like this:
select replace(
replace( replace( ................... replace(to_date(/* whatever date you need */, 'YYYYSP'), 'ONE', 'UNO'), ................... 'HUNDRED', 'CIENTO'), 'TWENTY', 'VIENTO'), 'THREE', 'TRES')
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Mar 24 2000 - 22:24:02 CST