Concatenate numbers

From: <>
Date: Wed, 2 Jan 2008 09:38:42 -0800 (PST)
Message-ID: <>


   I have a table with the following two columns and sample data:

    tran_date DATE;
    digits NUMBER;

    10/2/2007      0.000738889791980111
    11/22/2007    0.00083740843091
    12/11/2007    6.00083740843091

    For a special output, I tried to concatenate the two columns using the following SQL:

    SELECT to_char(tran_date,'YYYYMMDD') || ',' || digits from mytable;

    The result is missing the "0" for two numbers starting with "0." as in the following:

     20071211,6.00083740843091    (This is fine)

     I know I may be able to do some decode or other manipulation, but
could someone tell me why the leading "0" is omitted from the query output?

    Thanks in advance.

    Nick Received on Wed Jan 02 2008 - 11:38:42 CST

Original text of this message