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.
| Author |
Topic |
|
sqlilliterate
Starting Member
40 Posts |
Posted - 2008-02-20 : 01:51:54
|
| How do i store the result of a select query with XML in a single variable ?for e.g.I want to store the result of the following query in a variable(@text), where the output of the query is a single columnSelect * from <Table1> for XML auto |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-02-20 : 01:56:22
|
| DECLARE @var varchar(max)select @var=t1.listfrom(select * from @table for xml auto)t1(list)select @var as 'returnvalue' |
 |
|
|
|
|
|