Results 1 to 7 of 7

Thread: Spell

  1. #1
    Join Date
    Jun 2003
    Posts
    294

    Unanswered: Spell

    Hello !!
    With This I get the number in words:
    SELECT TO_CHAR(TO_DATE(12345, 'J'), 'JSP') FROM DUAL

    I wanna have the number in words but in Spanish, german or other languaje !


    Thanks !

  2. #2
    Join Date
    Jun 2003
    Posts
    294
    Aditionally It only works from 1 to 5373484, is there any way to convert bigger numbers ???

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    go to http://astom.oracle.com
    do a keyword search on
    number to text
    Tom supplies a PL/SQL function which does what you want.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  4. #4
    Join Date
    Jun 2003
    Posts
    294
    Than page is not available

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    sorry about that, I dropped a character
    go to http://asktom.oracle.com
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  6. #6
    Join Date
    Jun 2003
    Posts
    294
    Thanks !!!
    Thats what I need, Is there anyone in spanish ????????????

  7. #7
    Join Date
    Jun 2003
    Posts
    294
    Hello, I Modified the function that is in the homepage you said for "SPANISH" language:



    function spell_number_espa( p_number in number )
    return varchar2
    as
    begin
    return replace( replace( replace( replace( replace(
    replace( replace( replace( replace( replace(
    replace( replace( replace( replace( replace(
    replace( replace( replace( replace( replace(
    replace( replace( replace( replace( replace(
    replace( replace( replace( replace( replace(
    replace( replace( replace( replace( replace(
    replace( replace( replace( replace( replace(
    replace( replace( replace( replace( replace(
    replace( replace( replace( replace( replace(
    replace( replace( replace( replace( replace(
    replace( replace( replace( replace( replace(
    replace( replace(
    lower( spell_number( p_number ))
    , 'duodecillion' , 'duodecillon' )
    , 'quintillion' , 'quintillon' )
    , 'thousand' , 'mil' )
    , 'hundred' , 'cien' )
    , 'ninety' , 'noventa')
    , 'eighty' , 'ochenta' )
    , 'seventy' , 'setenta' )
    , 'sixty' , 'sesenta' )
    , 'fifty' , 'cincuenta' )
    , 'forty' , 'cuarenta' )
    , 'thirty' , 'treinta' )
    , 'twenty' , 'veinte' )
    , 'nineteen' , 'diecinueve' )
    , 'eighteen' , 'dieciocho' )
    , 'seventeen' , 'diecisiete' )
    , 'sixteen' , 'dieciseis' )
    , 'fifteen' , 'quince' )
    , 'fourteen' , 'catorce' )
    , 'thirteen' , 'trece' )
    , 'twelve' , 'doce' )
    , 'eleven' , 'once' )
    , 'ten' , 'diez' )
    , 'nine' , 'nueve' )
    , 'eight' , 'ocho' )
    , 'seven' , 'siete' )
    , 'five' , 'cinco' )
    , 'six' , 'seis' )
    , 'four' , 'cuatro' )
    , 'three' , 'tres' )
    , 'two' , 'dos' )
    , 'one' , 'uno' )
    , 'zero' , 'cero' )
    , '-' , ' y ' )
    , 'veinte y ' , 'veinti')
    , 'sediezta' , 'setenta')
    , 'uno cien ' , 'ciento ' )
    , 'uno cien' , 'cien' )
    , 'dos cien' , 'docientos' )
    , 'tres cien' , 'trescientos' )
    , 'cuatro cien' , 'cuatrocientos' )
    , 'cinco cien' , 'quinientos' )
    , 'seis cien' , 'seicientos' )
    , 'siete cien' , 'setecientos' )
    , 'ocho cien' , 'ochocientos' )
    , 'nueve cien' , 'novecientos')
    , ' uno mil ' , ' un mil ' )
    , 'uno mil ' , 'mil ' )
    , ' million ' , ' millones ' )
    , 'uno millones' , 'un millon' )
    , 'ciento millones', 'cien millones')
    , ' billion ' , ' billones ' )
    , 'uno billones' , 'un billon' )
    , 'ciento billones', 'cien billones')

    , ' trillion ' , ' trillones ' )
    , 'uno trillones' , 'un trillon' )
    , 'ciento trillones', 'cien trillones')

    , ' quadrillion ' , ' cuatrillones ' )
    , 'uno cuatrillon' , 'un cuatrillon' )
    , 'ciento cuatrillones', 'cien cuatrillones')

    , ' quintillon ' , ' quintillones ' )
    , 'uno quintillones' , 'un quintillon' )
    , 'ciento quintillones', 'cien quintillones')

    ;
    end spell_number_espa;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •