LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Excel 2007 is stupid dealing with zipcodes

I'm trying to import into a SQL 2008 DB. The data type on the column in the
DB is nvarchar(50) The spreadsheet we receive has a zip column that contains
both 5 digit and 9 digit zips. The 9 digit zips have hyphens. Regardless of
the format I apply to the column, Zip, text, custom #####-####, etc. - I lose
the leading zeros when they import. No problem there, I have a SQL script to
put them back. However, the zips that are 9-digit do not import AT ALL so I
get NULL as a result on several thousand zips.

OK fine then. I'll try first to format the zip column in the spreadsheet to
zip+9 so everything is in the same format and the OLEDB provider won't get
confused. You would think that the zips that are 5 digit i.e. 32904 would
change to 32904-0000 right? Nope, Excel gives you 0003-2904. Brilliant.

Anyone have any ideas other than something like concatenating -0000 onto all
the zips that are 5 digit in the spreadsheet first (which is cumbersome and I
should not have to do)before I run my import?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup with large file of zipcodes DTTODGG Excel Worksheet Functions 4 December 17th 08 02:44 AM
dealing with csv imported file in excel [email protected] Excel Discussion (Misc queries) 2 July 25th 06 12:12 PM
Not printing 0 in zipcodes from excel spreadsheet. iamdevoe Excel Discussion (Misc queries) 1 December 22nd 05 03:42 PM
Am I stupid, or is it Excel??????? Confuddled User!!!!!!!!!!!!! Excel Discussion (Misc queries) 5 December 9th 05 02:26 PM
How do I convert 9 digit zipcodes to 5 digits? Robert Judge Excel Discussion (Misc queries) 3 November 18th 05 05:57 PM


All times are GMT +1. The time now is 09:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"