Tuesday, February 10, 2009

[SQL] BULK INSERT and BCP -n

I came across this while rereading the man pages for BCP and BULK INSERT:


http://msdn.microsoft.com/en-us/library/ms188365.aspx

DATAFILETYPE value All data represented in:


native

Native (database) data types. Create the native data file by bulk importing data from SQL Server using the bcp utility.


I like BULK INSERT more than BCP, but you need BCP to export data. I was unaware that you could BCP a file out in Native format, and use BULK INSERT to import it. Doh!

No comments: