views:

150

answers:

1

I have a bunch of (50+) XML files in a directory that I would like to insert into a SQL server 2008 table.

How can I create a SQL script from the command prompt or Powershell that will let me insert the files into a simple table with the following schema:

XMLDataFiles (
  xmlFileName varchar(255)
, content xml
)

All I need is for something to generate a script with a bunch of insert statements. Right now, I'm contemplating writing a silly little .NET console app to write the SQL script.

Thanks.

+1  A: 
Bruce