See Create tables, bulk import, and query data - Learn. It describes use of bcp to import the data. When I do I get:
Error = [Microsoft][ODBC Driver 13 for SQL Server]Invalid character value for cast specification
for each of the 5 records. I think I followed the instructions.
My mytable.fmt file is:
14.0
2
1 SQLCHAR 0 12 "," 2 MyColumn1 ""
2 SQLCHAR 0 50 "\r\n" 1 MyColumn2 SQL_Latin1_General_CP1_CI_AS
My mydata.csv is as provided in the tutorial. I was a little confused because the tutorial says bash but I assume I should use a normal Windows command prompt. So I created a cmd file with the following:
bcp Tutorials.dbo.mytable in mydata.csv -f mytable.fmt -S samstutorialserver.database.windows.net -U Sam -P password -F 2
Did I miss seeing something in the tutorial or is the tutorial unclear or something else? What is causing the error?