looking for a function
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: looking for a function

  1. #1
    Join Date
    Nov 2002
    Location
    MADRID
    Posts
    8

    looking for a function

    I need a function that turns amounts letters to print checks, Somebody it has some or it knows where I can look for? thanks everyone

  2. #2
    Join Date
    Feb 2001
    Posts
    180
    Regards
    Ben de Boer

  3. #3
    Join Date
    Nov 2002
    Location
    MADRID
    Posts
    8

    Thanks a lot

    But now, I must to translate to Spanish, Franch, German and Portugues,
    easy any idea??????

  4. #4
    Join Date
    Feb 2001
    Posts
    180
    Maybe you can do something with NLS_LANGUAGE
    , but I am not sure.
    Regards
    Ben de Boer

  5. #5
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,587

    Re: Thanks a lot

    Originally posted by ap131
    But now, I must to translate to Spanish, Franch, German and Portugues,
    easy any idea??????
    In french here, just change the parameter's in the new fxn that you'll create in other languages............

    Code:
    appdev@NICK>create or replace 
      2  function spell_number_french( p_number in number )
      3  return varchar2 
      4  as
      5  begin
      6      return replace( replace( replace( replace( replace( 
      7             replace( replace( replace( replace( replace(
      8             replace( replace( replace( replace( replace(
      9             replace( replace( replace( replace( replace(
     10             replace( replace( replace( replace( replace(
     11             replace( replace( replace( replace( replace(
     12             replace( replace( replace( replace( replace(
     13             replace( replace( replace( replace( replace(
     14             replace(
     15             lower( spell_number( p_number ))
     16             , 'duodecillion', 'bidecillion'     )
     17             , 'quintillion' , 'cintillion'      )
     18             , 'billion'     , 'milliard'        )
     19             , 'thousand'    , 'mille'           )
     20             , 'hundred'     , 'cent'            )
     21             , 'ninety'      , 'quatre-vingt-dix')
     22             , 'eighty'      , 'quatre-vingt'    )
     23             , 'seventy'     , 'soixante-dix'    )
     24             , 'sixty'       , 'soixante'        )
     25             , 'fifty'       , 'cinquante'       )
     26             , 'forty'       , 'quarante'        )
     27             , 'thirty'      , 'trente'          )
     28             , 'twenty'      , 'vingt'           )
     29             , 'nineteen'    , 'dix-neuf'        )
     30             , 'eighteen'    , 'dix-huit'        )
     31             , 'seventeen'   , 'dix-sept'        )
     32             , 'sixteen'     , 'seize'           )
     33             , 'fifteen'     , 'quinze'          )
     34             , 'fourteen'    , 'quatorze'        )
     35             , 'thirteen'    , 'treize'          )
     36             , 'twelve'      , 'douze'           )
     37             , 'eleven'      , 'onze'            )
     38             , 'ten'         , 'dix'             )
     39             , 'nine'        , 'neuf'            )
     40             , 'eight'       , 'huit'            )
     41             , 'seven'       , 'sept'            )
     42             , 'five'        , 'cinq'            )
     43             , 'four'        , 'quatre'          )
     44             , 'three'       , 'trois'           )
     45             , 'two'         , 'deux'            )
     46             , 'one'         , 'un'              )
     47             , 'dix-six'     , 'seize'           )
     48             , 'dix-cinq'    , 'quinze'          )
     49             , 'dix-quatre'  , 'quatorze'        )
     50             , 'dix-trois'   , 'treize'          )
     51             , 'dix-deux'    , 'douze'           )
     52             , 'dix-un'      , 'onze'            )
     53             , '-un '        , '-une '           )
     54             , 'un cent'     , 'cent'            )
     55             , 'un mille'    , 'mille'           )
     56             , 'une'         , 'un' );
     57  end spell_number_french;
     58  /
    
    Function created.
    
    appdev@NICK>select spell_number_french(1234567890123456789)
      2  from dual
      3  /
    
    SPELL_NUMBER_FRENCH(1234567890123456789)
    ----------------------------------------------------------------------------------------------------
    un cintillion deux cent trente-quatre quadrillion cinq cent soixante-sept trillion huit cent quatre-
    vingt-dix milliard cent vingt-trois million quatre cent cinquante-six mille sept cent quatre-vingt-n
    euf
    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

  6. #6
    Join Date
    Aug 2001
    Location
    Waterloo, On
    Posts
    547

    More alternatives to the Script

    There are two more functions and a good discussion here, and they do not rely on JSP:

    http://forums.dbasupport.com/forums/...nction+convert

    Raminder Singh

    Oracle Certified DBA: Oracle 8i, 9i


    Mail me at raminderahluwalia@rediffmail.com.

Posting Permissions

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



Click Here to Expand Forum to Full Width