Zip Codes with Leading Zeros

4180
4
11-01-2010 11:26 AM
AmandaHubele
New Contributor
When loading tables that have entries with Zip Codes that lead with a 0 it doesnt load the 0's and is unable to match unless I manually type the Zip Code in . Is there a way around this?? Do I need to change the Zip Code column format before adding the data?
Tags (2)
0 Kudos
4 Replies
JoeBorgione
MVP Emeritus
Sounds like the original data is in text/character format, and if I take your use of the term 'loading' literally, it sounds like you are using the simple data loader to get the original data into another table.  Is that correct? 

Long story short, your text/character leading zeros are being translated into an integer format.  Whatever your process is, keep your original text format, and you should be good to go.

Hope this helps-
That should just about do it....
0 Kudos
AmandaHubele
New Contributor
Ive just been using the "Add Data" button in ArcMap. I loaded an Excel spreadsheet. I changed the format of the column to text before loading into the map and had less errors. Thanks!
0 Kudos
KarynBackus
New Contributor
Excel doesn't always maintain variable properties as it goes back and forth between programs. 

If the zipcode in Excel is being displayed with the preceding zero because the zipcode format has been applied to that cell/column, then the data is still considered numeric. 

Also, even if the zipcode data column has been changed to text format, your data may not retain that property when being read into another program.

For ArcGIS, I always save my data tables in dbf format.  You can save your excel file as dbf, but check to be sure the preceding zero was maintained.  Also, you can always convert your Excel table into an ArcGIS table via ArcCatalog.  This would be the preferred method to ensure compatibility between your table and ArcGIS processing.
0 Kudos
ZachEdwards
New Contributor III
I agree with Karyn. I always open my excel spreadsheets (after formatting) in ArcCatalog and right-click the sheet of interest and convert to DBASE (.dbf). ArcGIS will have problems with Excel sheets from time to time. To get rid of the leading zeros, i'd just create a new column in excel and  select the zip code column in excel and apply the following formula: =RIGHT(A2, LEN(A2)-2). That will remove two characters from right to left.



For ArcGIS, I always save my data tables in dbf format.  You can save your excel file as dbf, but check to be sure the preceding zero was maintained.  Also, you can always convert your Excel table into an ArcGIS table via ArcCatalog.  This would be the preferred method to ensure compatibility between your table and ArcGIS processing.
0 Kudos