Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Please Help! Formatting Numbers with Leading Zeros

Re: Please Help! Formatting Numbers with Leading Zeros

From: Kenny Gump <kgump_at_mylanlabs.com>
Date: Tue, 25 May 1999 09:43:01 -0400
Message-ID: <374aa8c5.0@news.mountain.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US