Discussion Locked

Stored Procedure

0 helpful
0 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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?

0 replies

No replies were posted before this discussion closed.

This discussion is closed to new replies.