开发者

Importing XML data from file into SQL Server 2008 R2 Database

I have 开发者_JAVA百科looked into this and cannot find a suitable answer. I want to import data from a .xml file into a SQL database from within SQL Server Management Studio (SSMS). I can do this from C# without issue and this is not my problem. A client want some data in XML format but also wants to be able to check this data for themselves. Rather than writing a program for them I want to supply them with a query that they can execute from within SSMS. There is alot of data and some of the methods I have read as solutions to simalar questions are not suitable for this case.

The .xml file was written using a set .xsd schema file and I would like to maintain the structure of the data in the .xml file when it is imported into tables in the SQL database. Any help is greatly appreciated...

Can anyone tell me the best way to go about doing this?


You could look at creating a stored proecedure which will accept an XML parameter or XML document fragment, similar to the way shown in this article (ignore the c# code that serializes an object into XML)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜