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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS Import drops data in text field

Status
Not open for further replies.

countdrak

Programmer
Jun 20, 2003
358
US
I have an excel sheet with a 16 digit number. When I import that excel sheet all the numbers are lost and I only get null in that column in sql table.

When I change the format in excel sheet to text or general I get a 8.324234e+11 number. And I cant move it to a table.

How can I move this excel sheet into a table using dts without losing data?! Thanks..any help would be great.

 
What is your column's data type?

If it is INTEGER, that can only store a ten digit number (up to 2,147,483,647). Try using BIGINT or varchar(16), depending on your needs.

Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Yeah but when I import a excel sheet into a table it never really asks me to specify datatypes.

Am I missing something? Thanks.
 
Are you importing to a new table or an existing one?

Ignorance of certain subjects is a great part of wisdom
 
Importing to a new table. I am using enterprise manager.
 
I think I recall from somewhere that DTS has problems with this. What I would do is save your excel file as a .csv (preferably with your number column formatted as text), and see if this helps. You can then change data types and stuff once your table is created and populated.

Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
glad it helped :)

Ignorance of certain subjects is a great part of wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top