Write a select statement that returns an xml document that


Exercise

1. Write a SELECT statement that returns an XML document that contains all of the invoices in the Invoices table that have more than one line item. This document should include one element for each of these columns: InvoiceNumber, InvoiceDate, InvoiceTotal, InvoiceLineltemDescription, and InvoiceLineltemAmount. Then, save the XML document that's returned in a file named MultipleLineltems.xml. Finally, generate an XML schema for the file and save it in a file named MultipleLineliems.xsd.

2. Write a script that uses the XML document shown below to update the contact information in the Vendors table.

McCrystle Timothy

Flynn Erin

To accomplish this, begin by storing this XML document in a variable of the XML type. Then, you can use two UPDATE statements to update the Vendors table.

3. Write a script that returns a result set that contains all of the data stored in the XML document in exercise 2.

4. Write a script that (1) creates a table named Instructions, (2) inserts the XML document shown below into the table, and (3) selects all records from this table. The Instructions table should have two columns. The first column should be an identity column named InstructionslD, and the second column should be an xml column named Instructions.

This is the first step. This is the first substep.

This is the second substep.

This is the second step.

This is the third step.

Exercise

1. Modify the first ProductDB class presented in this chapter so the ReadImage method accepts a PictureBox control as a second argument like this:

public static void Readlmage(int imageID, PictureBox pictureBox)

Then, modify the ReadImage method so it streams data from the database to the PictureBox control, and modify the code for the form so it works with this new method. To do this, you can begin by copying code from the form into the ProductDB class.

2. Modify the second ProductDB class so it works as described in exercise 1.

Attachment:- create_ap.rar

Solution Preview :

Prepared by a verified Expert
Database Management System: Write a select statement that returns an xml document that
Reference No:- TGS01412748

Now Priced at $40 (50% Discount)

Recommended (96%)

Rated (4.8/5)