List:General Discussion« Previous MessageNext Message »
From:walter harms Date:August 22 2008 10:07am
Subject:Re: Zip Codes with Leading Zeros
View as plain text  

Keith Spiller schrieb:
> Hi Johnny,
> 
> Yeah.  Sadly I missed the fact that the zip codes were hacked in our original Works
> to MySQL conversion until long after I had imported the data into our current MySQL table.
>  Now we have to fix the numbers in our MySQL table and guarantee that we can export them
> out to Excel for the printer.  I'm working on either finding or producing a script that
> will repair the 12,000 rows of mixed zip (5 digit) and zip+4 data.
> 
> I appreciate your taking the time to help us Johnny. 
> 


so you core problem is that you zip code is a number (or was in between) like 1234 and you
would like to see 01234.
unload your data and reformat using a simple shell script with a printf core like this
one:
  printf "%09d\n" 1234

this should be a matter of minutes to rewrite.

re,
  wh
Thread
Zip Codes with Leading ZerosKeith Spiller22 Aug
  • RE: Zip Codes with Leading ZerosTom [Burlington] Kralidis22 Aug
    • Re: Zip Codes with Leading ZerosKeith Spiller22 Aug
      • Re: Zip Codes with Leading ZerosAndy Shellam22 Aug
        • RE: Zip Codes with Leading ZerosJerry Schwartz22 Aug
      • Re: Zip Codes with Leading ZerosJason Pruim22 Aug
  • RE: Zip Codes with Leading ZerosJerry Schwartz22 Aug
Re: Zip Codes with Leading ZerosKeith Spiller22 Aug
  • Re: Zip Codes with Leading Zeroswalter harms22 Aug