DECLARE @temporaryTable tmpTbl
(
xmlValue xml
)
INSERT @tmpTbl (xmlValue)
SELECT
(
SELECT XColumn, YColumn
FROM table2
FOR XML PATH('productDetails')
)
Insert into table1 select * from tmpTbl
DROP tmpTbl;
Don't just copy paste as this is not tested.It may throw some syntax error.