Wednesday, March 7, 2012

is there any way to convert the result of an FOR XML EXPLICIT into a varcha(1000) in tsq

is there any way to convert the result of an FOR XML EXPLICIT into a
varcha(1000) in tsql?
In SQL 2000 it is impossible. In SQL 2005 you can easily achieve that using
FOR XML in sub-query syntax:
SELECT CONVERT(VARCHAR(1000),(SELECT 1 tag, 0 parent, 1 'elt!1!' FOR XML
EXPLICIT))
Regards,
Eugene
This posting is provided "AS IS" with no warranties, and
confers no rights.
"Daniel" <softwareengineer98037@.yahoo.com> wrote in message
news:eBrowdrbEHA.3864@.TK2MSFTNGP10.phx.gbl...
> is there any way to convert the result of an FOR XML EXPLICIT into a
> varcha(1000) in tsql?

No comments:

Post a Comment