I'm trying to import some pretty simple data into my SQL Server 2014 from a csv
file.
In the csv
file, I only have a single column with numeric data.
I'm using SQL Server Management Studio 17.6 and I connect to my database, then use Task Import Flat File
feature.
This is the error I see when I pick the file and click next:
Any idea what the problem is and how to get around it?
UPDATE:
Not quite the same as providing an actual file but here's a screen shot of the file. It contains phone numbers. I obfuscated the actual numbers so that we don't jeopardize anyone's privacy.
SQL Server Management Studio > select target database node > open contextual menu > Tasks > Import Data ... SQL Server Integration Services > Flat File Source. T-SQL statement BULK INSERT with \t COLUMNTERMINATOR. T-SQL function OPENROWSET(BULK 'file path') with format file and \t terminator.
*edited original post to address the initial issue
I received the same error trying to import a csv file with only one column. This seems to be a known error with the new import flat file wizard added in SSMS 17.3. As your data only has one column, it is throwing an error at the preview data step.
The work around is to right click your database, go to tasks => import data. This will start the data import wizard and you will be able to follow the import steps here to bring your data into a table.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With