Hi There,
I'm busy with some SQL XML. It's quite fun but I ran into a bit of snag. I need to set a variable = to a select for xml statement. If I had to put it into code I'd say it has to look something like this:
DECLARE @Str VARCHAR (8000)
SET @Str = (SELECT * FROM tPerson FOR XML AUTO)
As you can imagine this doesn't work. Is there any other way of doing this?
I'm busy with some SQL XML. It's quite fun but I ran into a bit of snag. I need to set a variable = to a select for xml statement. If I had to put it into code I'd say it has to look something like this:
DECLARE @Str VARCHAR (8000)
SET @Str = (SELECT * FROM tPerson FOR XML AUTO)
As you can imagine this doesn't work. Is there any other way of doing this?