Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Using FOR XML in a SELECT

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-16 : 09:41:52
Christine writes "I have a SQL table with 5 fields, all varchar(255). I want to do the following SELECT and store the result as an XML character string in a single text field.

SELECT question, correct, incorrect1, incorrect2, incorrect3 FROM table FOR XML AUTO, ELEMENTS

When I do the SELECT, the result is always truncated at 255 characters. I have tried outputing the result to a file, and the same thing happens.

How can I get a complete result set (untruncated) in XML that I can store in a text field?"
   

- Advertisement -