Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot importing excel file with leading zeros in zip+4

Status
Not open for further replies.

avid1741

Technical User
May 30, 2002
10
US
I am trying to import an excel file with zip+4 data that includes leading zeros. When I import using DTS the leading zeros are dropped. Is there a way to do this and keep the leading zeros?
 
I had trouble with this, too. The single quote was not working... My DTS package counted anything with a leading zero null. My approach was to append a character (i.e. X) to the front of all values in the column then strip off the x when I moved it from a temporary table to the permanent table with this code:

Code:
SET @SizeOfPart = Right(@SizeOfPart, Len(@SizeOfPart)-1)

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top