Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Please Help! Formatting Numbers with Leading Zeros
In SQL*PLUS use the column command:
col postal_code format 00000
SELECT POSTAL_CODE FROM DEALER_TABLE
WHERE CITY = 'WESTPORT'
or
you could use:
SELECT to_char(POSTAL_CODE,'00000') postal_code FROM DEALER_TABLE WHERE CITY = 'WESTPORT' Kenny Gump
Sussette Blasa wrote in message <3749D1D6.E6C70F6_at_earthlink.net>...
>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 - 08:43:01 CDT
![]() |
![]() |