to_number
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: to_number

  1. #1
    Join Date
    Nov 2000
    Posts
    440

    to_number

    if i do:
    SQL> select to_number('0.24') from dual;

    TO_NUMBER('0.24')
    -----------------
    .24


    it show .24, but i want to show 0.24, how to?

  2. #2
    Join Date
    Mar 2001
    Location
    AL
    Posts
    18
    I'm not sure of exactly what you are trying to do, but the following statement will work:

    select to_char(to_number('0.24'), 'FM0.99') from dual;

  3. #3
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    409
    Code:
    sql> select  to_number('0.24') from dual;
    
    TO_NUMBER('0.24')
    -----------------
                  .24
    
    Elapsed: 00:00:00.00
    sql> set numformat 0.99
    sql> select  to_number('0.24') from dual;
    
    TO_NUMBER('0.24')
    -----------------
                 0.24
    
    Elapsed: 00:00:00.00
    sql>
    HTH.
    -- Dilip

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