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.
Author |
Topic |
daveangel123
Starting Member
3 Posts |
Posted - 2011-10-03 : 07:11:04
|
I've got several standard CSV file with normal row and field delimiters that I've loaded using Bulk insert in to MySQL I've tried bulk insert #staging_1 from "D:\test\testfile_20111001.csv" with (fieldterminator = ',', firstrow = 2,rowterminator='\n')bulk insert #staging_1 from "D:\test\testfile_20111001.csv" with (fieldterminator = ',', firstrow = 2,rowterminator='')and a million different combinations (I've been at this for 2 solid days ) and I get this...Msg 4866, Level 16, State 8, Line 1The bulk load failed. The column is too long in the data file for row 1, column 20. Verify that the field terminator and row terminator are specified correctly.I've determined that the import is not able to see the row delimiter (ASCII value of 10). I can see the delimiter in Programmers File Editor and in other programs. Given this works in MySQL and every other program in the universe can see the delimiter does anyone know if this is a bug and if there is a solution?Please help me! |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-03 : 08:05:56
|
did you try putting as CHAR(10)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
daveangel123
Starting Member
3 Posts |
Posted - 2011-10-03 : 11:42:53
|
I've tried this but it didn't work I tried nchar(10) as well as char(10) too... |
|
|
daveangel123
Starting Member
3 Posts |
Posted - 2011-10-04 : 05:04:00
|
Just checked and I get the same issue in SQL 2008 R2 but definitely not in MySQL! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-04 : 05:13:22
|
did you try using a format file and specifying the delimiter inside it------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|