Hi,
I'm trying to find a way to create an XML file from an SQL table row using a stored procedure.
This is what I have so far, but it is incomplete;
Any hellp appreciated.
I'm trying to find a way to create an XML file from an SQL table row using a stored procedure.
This is what I have so far, but it is incomplete;
Code:
CREATE PROCEDURE dbo.xml_header
@page_id varchar(50)
AS
SET NOCOUNT ON
bcp "SELECT * FROM page_headers WHERE page_id=@page_id FOR XML AUTO,ELEMENTS,ROOT('customers')" queryout "App_data\header + @page_id +.xml -Slocalhost -U -P"
Comment