Michael Rys

Musings on XML, XQuery and more...

<December 2008>
SuMoTuWeThFrSa
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910


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



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 on Friday, February 20, 2004 2:22 PM by mrys


# Moving FOR XML EXPLICIT to the new PATH mode (part III) @ Monday, February 23, 2004 9:02 AM

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

mrys

# Bring on Yukon! @ Monday, February 23, 2004 9:58 AM

Michael Rys has had some great posts on the new XML query features of Yukon. I'm on the beta, but I haven't had enough time to take real advantage of it yet. Part I Part II Part III...

mrys

# Answers to my For Xml questions @ Tuesday, February 24, 2004 11:26 AM

mrys

# Answers to my For Xml questions @ Friday, February 27, 2004 3:02 PM

mrys

# Posts on FOR XML @ Wednesday, June 09, 2004 12:22 AM

mrys

# Posts on FOR XML @ Thursday, June 10, 2004 7:34 PM

mrys




Powered by Dot Net Junkies, by Telligent Systems