From: walter harms Date: August 22 2008 10:07am Subject: Re: Zip Codes with Leading Zeros List-Archive: http://lists.mysql.com/mysql/214202 Message-Id: <48AE8FE2.8050309@bfs.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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