all groups > sql server programming > december 2004 >
You're in the

sql server programming

group:

xml auto....plz help


xml auto....plz help thomson
12/6/2004 11:29:33 PM
sql server programming:
Hi all

If I execute the query---" select * from categories for xml auto"

It will return a column name with XMLsomething and the value as xml
representation of the above executed result.


I have to insert the xml value into another table which has only one
column of datatype varchar(8000).


Help me out

Regards

thomson
RE: xml auto....plz help John Bell
12/7/2004 12:03:04 AM
Hi

You cannot use FOR XML in the execute-statement of an INSERT statements i.e

INSERT .... SELECT... FOR XML is not allowed.

It is not clear why you want to store XML into a table rather than display
it directly.

This may be of some use e.g http://sqlxml.org/faqs.aspx?faq=10 or
http://sqlxml.org/faqs.aspx?faq=29

John

[quoted text, click to view]
AddThis Social Bookmark Button