Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exporting the results of a stored proc to XML
Message
From
05/08/2006 21:44:17
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Exporting the results of a stored proc to XML
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01143277
Message ID:
01143277
Views:
56
From within Query Analyzer, does anyone know how to redirect the results of a stored procedure to an XML file?

I have a stored proc that returns 3 tables. What I’d like to do is type something along the lines of:
     EXEC MyStoredProc  @Parm1, @Parm2   OUTPUT TO C:\XMLResults.XML
There are new FOR XML clauses in SQL 2005, but from what I've seen, they seem to apply to individual SELECT statements.

I know that I can write a few lines of code in ADO.NET to do it. Just curious if I can do it within SQL Server.


Kevin
Next
Reply
Map
View

Click here to load this message in the networking platform