Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Import wizard does not inport all columns

Author  Topic 

MelTed
Starting Member

9 Posts

Posted - 2015-05-04 : 15:47:38
Good day,

I'm baffled by an import issue I have. I'm using the import/export wizard in SSMS for SQL server 2008. I'm import into a database table for an excel file. The file contains 39 columns. When I use the wizard to import the data only 36 columns are being imported. Can you help me determine why? I can't think of what may be the reason the other 3 columns are not imported.

Your help would be appreciated

Regards

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2015-05-04 : 16:13:44
Try saving the file to csv format and then using a hex editor to determine if there's a weird character between columns 36-39 that would cause it to think it's at the EOL. Pretty sure you have to go to text format for that and not directly from Excel format.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2015-05-04 : 16:14:33
Also, you might need to change your EOL character in the import wizard.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

MelTed
Starting Member

9 Posts

Posted - 2015-05-06 : 14:15:47
Hello,

Thanks for your response. I had to leave work that afternoon and didn't see your response until today when I returned. I'm not certain what a hex editor is. Also when I put the file in csv format, fewer columns are imported. actually below 10 are imported.

Any thoughts?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2015-05-06 : 15:37:12
Something is wrong with your file then. It's got end-of-line characters in the middle of the row and also possibly column delimiters in between.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

MelTed
Starting Member

9 Posts

Posted - 2015-05-06 : 16:09:14
Ok. I'll check it again.

Thank youi
Go to Top of Page
   

- Advertisement -