I wrote this SQL Server Bulk script:
BULK INSERT dbo.test FROM 'd:\1.csv' WITH( FIELDTERMINATOR =',' );
But my CSV file must be encoded using this encoding system:
Encoding.GetEncoding(1256)
How can I apply the code to this bulk script?
CodePage is what you are looking for. You may also need a set of RowTerminator values.
BULK INSERT dbo.test FROM 'd:\1.csv' WITH( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n', CODEPAGE = '1256' );