Purchase Solution

SQL server XML to insert and query Products

Not what you're looking for?

Ask Custom Question

Create a table of XML documents with a type of XML. Use a primary key (you can't use an XML type) so add a field of type INT that is an identity.
Insert several records into the XML field in this new table. Use the following template:

<Root>
<ProductDescription ProductID=""ProductName="">
<Features>
<Warranty></Warranty>
<Maintenance></Maintenance>
</Features>
</ProductDescription>
</Root>

Once these have been added, modify the structure of XML inside of your XML typed field to add another tag of <Material></Material>
Within the Features tag, use the "modify" function to make this happen.
Once this is complete, write an XQuery query using the value clause to return a single record.
CREATE TABLE script, the INSERT statements, the "modify" script, and the XQuery script.

Purchase this Solution

Solution Summary

The solution contains SQL script that creates database table, inserts a couple of XML records, then runs XPath based queries to update or fetch records.

Solution Preview

Please find attached SQL script. It will first create a table product with identity ...

Purchase this Solution


Free BrainMass Quizzes
C++ Operators

This quiz tests a student's knowledge about C++ operators.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Basic Networking Questions

This quiz consists of some basic networking questions.