Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

getting xml data

1 view
Skip to first unread message

Roy Goldhammer

unread,
Aug 25, 2010, 4:56:27 AM8/25/10
to
Hello there

I have some store procedures who execute XML.

I would like to run them and store the XML in table, variable.

how can i do that?


SetonSoftware

unread,
Aug 25, 2010, 11:16:49 AM8/25/10
to

Roy

You could treat the Xml like any other data type and store it. For
example:

DECLARE @Data xml

SET @Data = (SELECT *
FROM SourceTable
WHERE ID = 101 FOR XML Auto, Type)

INSERT INTO TargetTable (MyXml) VALUES (@Data)

Hope this helps

Carl


0 new messages