simonchristieis
Programmer
I have a stored proc that returns xml
I want to call this proc and create a larger xml document, using a wrapper root node, I suppose I want to append the results to the first node
Anyone know how I can do this ?
Code:
CREATE PROCEDURE [dbo].[Select_Test]
AS
BEGIN
SET NOCOUNT ON;
Select 1 as Tag,
null as Parent,
null as [Level2!1],
'' as [Level3!2]
Union All
Select 2 as Tag,
1 as Parent,
null as [Level2!1],
'' as [Level3!2]
For Xml Explicit
END
I want to call this proc and create a larger xml document, using a wrapper root node, I suppose I want to append the results to the first node
Code:
CREATE PROCEDURE [dbo].[Select_MultipleTest]
AS
BEGIN
SET NOCOUNT ON;
select '<Level1>'
Exec Select_Test
Exec Select_Test
Exec Select_Test
select '</Level1>'
END
Anyone know how I can do this ?