Sunday, March 25, 2012

automatically import csv to MsSQL

Hi is there a way to emulate the MSSQL import wizard with a command prompt so I can shedule an automatic import form a csv file?
Thansk!Look up BCP (bcp in) and bulk insert in BOL. There are several command line parameters that can be used. Sometimes you can get by with filename and table table.

Bill|||If you're using the import wizard, just save it as a DTS package (option available at the end). You can then schedule the DTS package to run whenever you want. Look at www.sqldts.com for information on DTS.|||Thanks! I didn't notice you could save the DTS.

I'll try that, since the file and table will be fixed, I'm sure it will work!

Thansk again.|||Better look closely at the options you select.

No comments:

Post a Comment