Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Please Help! Formatting Numbers with Leading Zeros
don't think I would have made it numeric in the first place... what about nine and eleven digit zips? how would you handle the dash and space? how do you store phone numbers?
Now, to answer your question. In your SQL script, do the following format statement:
column zip_code format 00009
and your data will be returned with the leading zeros.
David Russell
On Mon, 24 May 1999 15:25:26 -0700, Sussette Blasa <stblasa_at_earthlink.net> wrote:
>Hi--hope somone can help...I've been trying to find a way to format
>postal/zip code. The field is a number datatype. For example the postal
>code for Westport, CT is 06880. However, when a run a query like this:
>
>SELECT POSTAL_CODE FROM DEALER_TABLE
>WHERE CITY = 'WESTPORT'
>
>The output comes out with " 6880". I want the output to return with the
>five-digit number "06880" instead.
>
>Any help would be appreciated!
>
>--Sussette
>
>
Received on Tue May 25 1999 - 18:16:34 CDT
![]() |
![]() |