Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a SELECT statement that returns an XML document that contains all of the c

ID: 3675000 • Letter: W

Question

Write a SELECT statement that returns an XML document that contains all of the current shipping addresses for the customers in the database. This document should include one element for each of these columns: FirstName, LastName, Line1, Line2, City, State, and ZipCode. Then, save the XML document thats returned in a file named CustomerAddresses.xml. Finally, generate an XML schema for the file and save it in a file named CustomerAddresses.xsd I mi

I just need this one code. The rest will fall in to place.

Explanation / Answer

USE DATABASE_NAME
GO
SELECT Cust.FirstName,
Cust.LastName,
Cust.Line1,
Cust.Line2,
   Cust.City,
   Cust.State,
   Cust.ZipCode
FROM Customer Cust
FOR XML AUTO

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote