Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2004
    Posts
    25

    Unanswered: Please help: number format

    Hi,
    I would like to get this format for my numbers:
    445.675,23

    I tried with
    TO_CHAR(myNum,'999.999,99')
    but I get the following error: "ORA-01481: invalid number format model"

    Then, how should I get that format?
    Thank you...

  2. #2
    Join Date
    Aug 2004
    Location
    France
    Posts
    754
    Code:
    rbaraer@Ora10g> select TO_CHAR(445675.23,'999G999D99','NLS_NUMERIC_CHARACTERS = '',.''') from dual;
    
    TO_CHAR(445
    -----------
     445.675,23
    
    rbaraer@Ora10g>
    Note that this does not work anymore with a number greater then 999999.999, so for such numbers you will have to add "999G" at the beginning of the format as many times as you need :
    Code:
    rbaraer@Ora10g> select TO_CHAR(4445675.23,'999G999D99','NLS_NUMERIC_CHARACTERS = '',.''') from dual;
    
    TO_CHAR(444
    -----------
    ###########
    
    rbaraer@Ora10g> select TO_CHAR(4445675.23,'999G999G999D99','NLS_NUMERIC_CHARACTERS = '',.''') from dual;
    
    TO_CHAR(4445675
    ---------------
       4.445.675,23
    
    rbaraer@Ora10g>
    HTH & Regards,

    rbaraer
    ORA-000TK : No bind variable detected... Shared Pool Alert code 5 - Nuclear query ready .

  3. #3
    Join Date
    Oct 2004
    Posts
    25
    It definitely works.

    Merci beaucoup

  4. #4
    Join Date
    Aug 2004
    Location
    France
    Posts
    754
    Quote Originally Posted by aletheia
    Merci beaucoup
    De rien.
    ORA-000TK : No bind variable detected... Shared Pool Alert code 5 - Nuclear query ready .

Posting Permissions

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