I'm trying to load data from a sample file, but I'm using couple of parameters in the WITH clause and hence it does not compile.
I'm using SSMS18, Not sure if that is an issue?
Not Working:
BULK INSERT #datalabeler FROM 'sample.csv' WITH ( DATA_SOURCE = 'DeployData', fieldterminator ='|', rowterminator = '0x0a', FORMAT = 'CSV' ) ; Working:
BULK INSERT #datalabeler FROM 'sample.csv' WITH ( --DATA_SOURCE = 'DeployData', fieldterminator ='|', rowterminator = '0x0a', --FORMAT = 'CSV' ) ; If I comment out the DATA_SOURCE then it works but If it has either DATA_SOURCE or FORMAT = 'CSV' then it does not compile
Here is the error from SSMS 18.
Error: Msg 102, Level 15, State 1, Procedure FDB_Load, Line 262 [Batch Start Line 7] Incorrect syntax near 'FORMAT'.
Can somebody please help?
https://stackoverflow.com/questions/67051436/data-source-using-bulk-insert-in-sql-server-does-not-compile April 12, 2021 at 08:43AM
没有评论:
发表评论