Stored Procedure - TechRepublic
General discussion
June 6, 2003 at 06:15 AM
ericrb

Stored Procedure

by ericrb . Updated 23 years, 1 month ago

I am trying to create a stored procedure that will use a query to extract data in an xml format and output it to a file.
I was hoping for something like this

Set @xml = (Select * from table1 where col1=’test’ FOR XML RAW)

then
echo to a filename using xp_cmdshell

but it will not work.
I know how to do this with vb but i need the code to be in the stored proc.

Can anyone assist me?

This discussion is locked

All Comments