Table created in SQL Server
create table tbl (Id int, [Date] date, Notes nvarchar(max))
To load data into the tbl table created tbl.fmt
12.0 3 1 SQLINT 0 4 "," 1 Id "" 2 SQLDATETIME 0 8 "," 2 Date "" 3 SQLCHAR 0 0 "\r\n" 3 Notes ""
Following code
bulk insert tbl from 'd:\tbl.txt' with ( firstrow = 2, DATAFILETYPE = 'widechar', FORMATFILE = 'd\tbl.fmt', tablock )
for the file d: \ tbl.txt
Id, Date, Notes "1", "2016-01-01", "какой-то текст"
gives an error message:
Implicit conversion from data type Use the CONVERT function to run this query.
How to make the correct loading using FORMATFILE?