June 12, 2007 at 8:47 am
Silly question, but how can I store the XML returned from a SELECT FOR XML statement?
Basically, I want to create XML from a select statement, then store the XML into a variable. I can see the XML returned (usually truncated!) in rows in the query analyser, but is it possible to store this to a variable, ideally a table variable??
Thanks.
June 12, 2007 at 9:22 am
In 2005 you can use the XML datatype, in 2000 you can use varchar(8000) if your xml is not greater than 8000 otherwise the text datatype can hold you xml...
-
June 12, 2007 at 9:25 am
Thanks for your reply, but that hasn't really answered my question .... how do I get the XML results from the SELECT into the variable??
June 12, 2007 at 9:47 am
This site has a lot of info on xml and SQL, one of the FAQ is how to get XML from SQL and gives an example using openquery...
-
June 12, 2007 at 10:00 am
Thanks Jason, looks like a good place for info!!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply