Import Data from BCP Files

  • Thread starter Thread starter Shayaan
  • Start date Start date
S

Shayaan

Guest
I have a .txt file and an xml file that I have downloaded form a site (SQL BCP formatted)

How do I import data form the file whhc would also create table from the xml file?

I've tried the following script but it requires table to exist. I have 100s of these file and would like to use a script to automate the process.

BULK INSERT dbo.MyTable
FROM 'C:\MyData\MyFile.txt'
WITH (FORMATFILE = 'C:\MyData\MyFile.xml');
GO

Continue reading...
 
Back
Top