I'm trying to create a format file from a table, to be used in the Bulk Insert Task of a step in an SSIS package I'm building.
The reason I want to use a format file is because I need to import a very large csv file every day into the database (hence the use of the Bulk Insert rather than normal Data Flow), and I notice the csv file is sometimes incomplete. Sometimes the last line of the file just ends abruptly.
While that needs to be fixed, that's not my problem. And I must pull in all the data regardless of things like that.. at least for now.
So I thought a format file would do the trick. Am I right? If not, what do you think?
On the database server itself, I run this line and get a syntax error:
bcp Diamond.dbo.STG_CUSTOMERCOMPLAINTS_BIT format nul -c -f "w:\testformat.fmt" -S cnwp0145 -T
The syntax error is attached.
I can't figure out what I'm doing wrong here. Could you help me?