> I have a small question. > I am recently started using 2005 and I want to assign results of following > query in to a variable of any type. > > select top 1 * from dbo.authors for xml auto > > > Please let me know how do I achieve this. >
RE: assigning xml output
Omnibuzz
5/11/2006 3:08:02 AM
and use it this way. Hope this helps.
declare @a varchar(8000) set @a= (select top 1 * from dbo.Authors for xml path('AUTHORS') ) select @a