-
Bulk insert problem.
I have a problem with bulk insert.
I try to insert an .xls file to a database table, but I don't know what values should I put in the FIELDTERMINATOR and the ROWTERMINATOR. I tried almast every posible combination mostly this one:
BULK INSERT DBname..tablename FROM '\\cs_file\public\test\teszt_import.xls'
WITH (
DATAFILETYPE = 'native',
FIELDTERMINATOR = '\t',
ROWTERMINATOR = '\n'
)
I get the following error message:
Bulk Insert fails. Column is too long in the data file for row 1, column 1. Make sure the field terminator and row terminator are specified correctly.
-
Try save it as .csv file.
-
As RMIAO said use CSV, BULK INSERT does not work with non text files. If you must use XLS file, use DTS.
-
Thank you for your help. I saved it as a CSV, so now it works.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|