I was trying copy data from a table to another table in another database using bcp.
First a format file was created using
!! bcp dbName1.dbo.tableNam
The problem was with format specifiers (-c
, -n
) while creating Format-file and Data-file.
The format specifier for Format File (-n
) and Data File (-c
) was different.
When I changed format specifier of both to either -c
or -n
, the import statement worked.
Since retaining datatype of columns was important for my purpose, -n
was used for format file and data file