zerofill: lost my leading zeroes

Поиск
Список
Период
Сортировка
Искать

zerofill: lost my leading zeroes

От:
Vincent Stoessel <vincent@xaymaca.com>
Дата:
ugh,
I created an integer  column to hold zip codes and
forgot that some US states have zips that start with zeroes.
ie 03455 in new England. There is no zerofill option for
the integer data type is there?
Vincent


Re: zerofill: lost my leading zeroes

От:
Bruno Wolff III <bruno@wolff.to>
Дата:
On Wed, Mar 20, 2002 at 01:41:46PM -0500,
  Vincent Stoessel  wrote:
> ugh,
> I created an integer  column to hold zip codes and
> forgot that some US states have zips that start with zeroes.
> ie 03455 in new England. There is no zerofill option for
> the integer data type is there?

Either you want to store the zip code as a string instead of a number
or when you print out the number you want to use to_char using a format
of '00000'.

Re: zerofill: lost my leading zeroes

От:
Vincent Stoessel <vincent@xaymaca.com>
Дата:
Thanks, I understand now.

Bruno Wolff III wrote:
> On Wed, Mar 20, 2002 at 01:41:46PM -0500,
>   Vincent Stoessel  wrote:
> 
>>ugh,
>>I created an integer  column to hold zip codes and
>>forgot that some US states have zips that start with zeroes.
>>ie 03455 in new England. There is no zerofill option for
>>the integer data type is there?
> 
> 
> Either you want to store the zip code as a string instead of a number
> or when you print out the number you want to use to_char using a format
> of '00000'.



FAQ