Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT. . . FOR XML ELEMENTS, TYPE

Status
Not open for further replies.

Skittle

ISP
Sep 10, 2002
1,528
US
When would you use the TYPE command at the end of a FOR XML statement?

Eg.
SELECT * FROM MyFile
FOR XML, ELEMENTS, TYPE

The references I have looked up state that the 'TYPE' qualifier will return the results as a proper XML field.
I can't see where this would be an advantage. I can insert XML into an XML data type column or variable without declaring the results as a TYPE...so where is it sueful? What does capacity does it add to a SELECT statement?



Dazed and confused
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top