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
 General SQL Server Forums
 New to SQL Server Administration
 Problem with Import Wizard-csv file

Author  Topic 

Rach2009
Starting Member

37 Posts

Posted - 2009-09-21 : 10:29:05
Hi

I am currently trying to import a flat file (.csv file) into SQL Server Management Studio via the Import Wizard and am encountering a few problems.

Although all the columns in my table are set to "Allow Nulls" (except the Primary Key) it won't import a chunk of rows at the end of my csv file for no obvious reason except that they have alot of empty column values. The only way I seem to be able to import all of the rows successfully is to set nearly all of the columns in the table to be data type nvarchar - which is not efficient.

Is there any potential reasons why the wizard is refusing to import these rows with many empty columns in them? Also, a Unicode definition would be very useful to help fully understand the need for nvarchar data type.

Many Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-09-21 : 12:36:42
Not sure why you are encountering this, but have you tried bcp.exe or BULK INSERT as an alternative import mechanism?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -