Hi,
I want to store the result of the query
SELECT * FROM Customer FOR XML AUTO,ELEMENTS
Into an output veriable. How will I do this in SQL Server 2000?
I've tried this in simple way like
declare @.x varchar(1000)
set @.x = (select * from customer for xml auto,elements)
select @.x
This is perfectly working in SQL 2005 but throwing error in 2000
also in I've tried this using cursor, TempTable on SQL Server 2000.
Please help me.
You can't able to do this in SQL Server 2000. In SQL Server 2000 we don't have XML datatype. It is introduced from SQL Server 2005 only.
The only possible solution is manullay concatinating the values, but it is very expensive and there is char length limitation (8000) may cause truncation of your data.
|||
Thank you very much.
No comments:
Post a Comment