Viewing 2 posts - 1 through 2 (of 2 total)
I found a workaround myself, which seems pretty dirty, but it does the trick :
SELECT Tag = 1,
Parent = NULL,
'record!1!id' = Id,
'record!1!code' = Code,
'record!1!!XML' = CAST(XmlContent.query('//test') AS varchar(max))
FROM @Records
FOR XML...
February 2, 2016 at 10:42 am
#1856046
I found a solution with dynamic SQL (I know, YUK!), using the built-in REPLICATE string function to multiply an INSERT SQL-string...
DECLARE @strSQL VARCHAR(MAX);
SET @strSQL = '';
SELECT @strSQL = @strSQL +...
January 11, 2012 at 1:41 am
#1431614