Hi
I am trying to use FOR XML AUTO clause in Sql Server 2000.
My requirement is to use this clause and assign the result set into a parameter.Like
Declare @.ss XML
set @.ss=(SELECT * FROM TB_TMGroup WHERE TM_GroupID = 29 FOR XML AUTO,ELEMENTS, BINARY BASE64)
print @.ss
So that i can use this paramer "@.ss" inside a insert statement.
Can any one help on this ?
Thanks.
You can’t do this in SQL Server 2000.
In SQL Server 2000 there is no XML data type, so you can’t able to store the FOR XML output into your local variable.
The first XML data type is introduced in SQL Server 2005. If you use SQL Server 2005 then your query will work fine. J
No comments:
Post a Comment