I have a local .csv file that has the following content:
This file is located at C:\Desktop\name_table.csv
on my pc.
Then I want to use bcp to upload the content in this .csv file to Microsoft Azure SQL database.
I created a table called test
in my Azure SQL database, and it has two columns, "name" and "ID".
Then I used the following command in the Azure built-in console:
bcp mydatabase.dbo.test in C:\Desktop\name_table.csv -S ****.database.windows.net -U **** -P **** -q -c -t
I got the following result:
It says "0 rows copied", but there are 4 rows in my .csv file. What did I do wrong?
Thanks
There are a couple of things that might be of interest here:
More information: Load data from CSV into Azure SQL Database or SQL Managed Instance (flat files)