Michael Rys

Musings on XML, XQuery and more...

<October 2008>
SuMoTuWeThFrSa
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678


Navigation

Papers

SQL Server XML Whitepapers

Weblogging Links

MS Bloggers

Recommended Books

Other Blogs

Recommended Links

Presentations (Upcoming)

Presentations (Recent)

Subscriptions

News


Upcoming Presentations


TechEd 2007, Orlando, June 4 to June 8, 2007


Books I co-authored



www.flickr.com
This is a Flickr badge showing public photos from Michael Rys. Make your own badge here.
eXTReMe Tracker

Post Categories

Article Categories



Friday, February 20, 2004 - Posts

Moving FOR XML EXPLICIT to the new PATH mode (part III)

Well, I thought that I could be done with 2 parts. But Bryant asked some interesting questions, so I am going to give him and everybody else the answers.

Q1: Will the new nesting mode support stored procedures?

No. Since SELECT statements cannot select from stored procedures, we do not support stored procedures on the server. If you want results of some form of processing transformed into XML, please use either a user-defined funtion or a view. The way to look at FOR XML is as a rowset aggregator (we are working on a proposal to the ANSI/ISO committee for such an aggregator for the next version of the XML part of the SQL standard).

Q2: Would you be able to store the results of a For Xml query into a variable? And if so, can you use those results in For Xml nested queries?

Yes to both.

Q3: I'm not sure I understand the value list example:

(select orderid as 'data()'
 from orders
 
where customers.CustomerID=orders.CustomerID
 
FOR XML PATH('')
 ) as '@OrderIDs',

What does this result in? <Customer OrderIDs="ID1 ID2 ID3" ... >?

My apologies that I left out the actual result. I added it to the orginial article. And the answer is yes.

Q4: When will we get to try these ourselves ;)

Get yourself onto the list for Beta2 (if you are not yet part of the Beta1 program, in which case you may get it earlier, check with your MS contact person).

posted Friday, February 20, 2004 2:22 PM by mrys with 6 Comments




Powered by Dot Net Junkies, by Telligent Systems