Importing using BCP
bcp <database>.<table> in c:\mycsv.csv -fc:\myfmt.fmt -Sservername -Usa -Ppassword
- database: The database.
- table: The table you wish to load data into.
- c:\mycsv.csv: The CSV you are loading the data from.
- -fc:\myfmt.fmt: The Format File to match your data format, see Creating a Field Format and Mapping File for BCP.
- -Sservername: Server that the database is stored on, not necessary if local.
- -Usa: Username.
- -Ppassword: Password.
So, I used:
C:\>bcp database.dbo.Item in "c:\items.chopped-1record.txt" -fc:\bcp.fmt -Usa -Ppassword -e errors.txt