Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    6

    Unanswered: Forcing leading zero

    How can I force a number to have leading zeros ?

    select '123456' from dual;

    I have try using TO_NUMBER :

    select TO_NUMBER('123456','00999999') from dual;

    But it doesn't seems to work. It will conserve the leading zeros but I want to add some.

  2. #2
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    6
    Hehe.. sorry I get it, I just have to use TO_CHAR instead of TO_NUMBER

  3. #3
    Join Date
    Jul 2001
    Location
    Germany
    Posts
    189
    That´s the way it is

    Greetz

    Manfred Peter
    (Alligator Company)
    http://www.alligatorsql.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
  •