0

I have dozens of XML files. I would like to store each one as an entry in an SQL Server table of type XML, so that I could query it and manipulate its field data using the built-in functionality the latest version of SQL Server provides. What is an efficient way to do this? I could import each file into a cell in Excel, then import that into SQL Server, but haven't figured out how to do that either, without copy-pasting by hand.

Boris K
  • 3,442
  • 9
  • 48
  • 87
  • 1
    You could use SSIS to import the files. – Sean Lange Jun 22 '17 at 13:52
  • [Read this answer](https://stackoverflow.com/a/44478344/5089204). It shows how you can import a list of XML files into a SQL Server's table directly, no Excel or other workaround needed (but your Server must have access to the storage path). The second part oft the answer shows how to read from XML. – Shnugo Jun 22 '17 at 15:42

1 Answers1

1

One way is SSIS; another way would be a to write a simple console app. Whichever you're more comfortable coding would probably be the most efficient way for you.

Tab Alleman
  • 31,483
  • 7
  • 36
  • 52