SQL Server with Mr. Denny

Dec 15 2008   9:00AM GMT

Back To Basics: Getting Data from an XML Document

Denny Cherry Denny Cherry Profile: Denny Cherry

One of the most popular ways to get data multiple pieces of data in a single parameter from one stored procedure to another, or from a client application to the database is to use XML. This can be done in SQL Server 2000 by using the NTEXT (or TEXT) datatype, and in SQL 2005 using the XML datatype. (In SQL Server 2008 you can use Table variable input parameters.)

Being able to use this XML data means knowing how to work with XML documents, as well as knowing how to use XPath. For many DBAs working with XPath is very new. Until now its been pretty much the domain of developers.

I would normally put a whole bunch of source code here, but I posted some earlier this year in my “XML in the database. What’s the big deal any way?” posting, so I’ll simply refer you back to it.

Denny

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: