I've recently found out about the command prompt function BCP.
I am testing it out, and am able to export data to a file using this:
BCP Northwind.dbo.Categories out c:\categories.txt -n -Smyservername -Uusername -Ppassword
and it works fine, as it outputs this:
8 rows copied.
So I now want to import the data back into the database, so I use this:
BCP Northwind.dbo.Categories in c:\categories.txt -c -Smyservername -Uusername - Ppassword
and when I run that, it returns the following error:
SQLState = S1000, NativeError = 0
Error = [Microsoft]pODBC SQL Server Driver]Unexpected EOF encountered in BCP data-file
0 rows copied.
What am I doing wrong?