1

While inserting bulk data in sqlserver with query

BULK INSERT Table_name
FROM 'FilePath'
WITH 
( FIELDTERMINATOR ',',
ROWTERMINATOR '\n')
;  

I'm getting error

"Incorrect syntax near '('."

I don't see an error in the above statement - could someone please help?

  • 1
    Is this the only statement, or there is something before it? – dezso Feb 24 '17 at 10:06
2

Looking at the BULK INSERT documentation, it shows that the syntax should be:

BULK INSERT Table_name
FROM 'FilePath'
WITH 
( FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n')
;  

ie, with = signs between the option name and the value.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.