By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

Alternative to OpenXML

P: n/a
Hi All,
I want to pass XML and the data in the XML should be stored in the
tables of the database. However, I do not want to use the OpenXML
statement. Please let me know.

Regards, Shilpa

Mar 17 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Shilpa (sh*************@unisys.com) writes:
I want to pass XML and the data in the XML should be stored in the
tables of the database. However, I do not want to use the OpenXML
statement. Please let me know.


Which version of SQL Server are you using? If you are on SQL 2000, and
you to insert data in the XML statement piece by piece (and not just
the XML document as such), there is no alternative to OpenXML.

On SQL 2005 you can XQuery to extract data from the XML document.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 17 '06 #2

P: n/a
Stu
Actually, there is an alternative for SQL Server 2000 to the OpenXML
statements: SQLXML BulkLoad. It's a COM-based application dll that you
can use to shove XML documents into relational tables. We just started
working with it, and though it's a bit trivky to set up, it actually
performs better with large amounts of XML than the OpenXML procedures.

However, I'm not sure I understand the OP's original question; OpenXML
is used for parsing XML documents into relational tables. If you just
want to store complete XML documents, just store them in a varchar or
text column. Unless you're specifically querying for a value embedded
in the XML document, it's just easier to manage.

HTH,
Stu

Mar 17 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.