Thursday, March 8, 2012

assign variable to an XML query's result

Can I set output of an XML query to a variable (SQL Server 2000)? The
following query does not parse:
DECLARE @.Xml NTEXT
SET @.Xml = (SELECT D.*
FROM WSDMS..Documents D
WHERE D.ID = @.DocumentID
FOR XML AUTO)It's not possible for sql2k.
--
-oj
<bbla32@.op.pl> wrote in message
news:1172081331.938350.4510@.l53g2000cwa.googlegroups.com...
> Can I set output of an XML query to a variable (SQL Server 2000)? The
> following query does not parse:
> DECLARE @.Xml NTEXT
> SET @.Xml => (SELECT D.*
> FROM WSDMS..Documents D
> WHERE D.ID = @.DocumentID
> FOR XML AUTO)
>

No comments:

Post a Comment