0

How to execute variable declare insert data from CSV file.

I have code like this but doesn't work

DECLARE @namafile nvarchar(100) ='E:\files\importdata.csv'

BULK INSERT tblimportmining
FROM '@namafile'
WITH
(
    FIRSTROW = 2,  
    FIELDTERMINATOR = ',',   
    ROWTERMINATOR = '\n',    
    TABLOCK
) 
Dale K
  • 21,987
  • 13
  • 41
  • 69
asl
  • 3
  • 3

0 Answers0