October 7, 2006 at 10:41 am
This problem was hard for me to find but finally figured it out.
If you run bulk insert on the SQL box, it will bulk insert if the CSV file has 2 fields and the SQL table has 2 fields all is fine. If you run bulk insert on a remote machine, if there are more than 1 fields the bulk insert fails.
EXEC('BULK INSERT Csv..test FROM ''C:\network.csv'' WITH (FIELDTERMINATOR = ''","'', ROWTERMINATOR = ''\n'')')
network.csv data:
"x","x"
"x","x"
"x","x"
Talk about driving me crazy, this isn't fair, LOL. Does anyone know why bulk insert would not work on a remote machine but works fine on the SQL box. Thanks!!!
October 10, 2006 at 8:00 am
This was removed by the editor as SPAM
October 10, 2006 at 8:05 am
what error you are getting when you execute the BULK INSERT...
--Ramesh
October 10, 2006 at 9:07 am
I looked at this last night. Disregard my original diagnosis.
After messing with this all it took was using the UNC in the bulk insert statement and all is fine. Thanks!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply