Re: FOR XML EXPLICIT Over Multiple Stored Procedures
From: Michael Rys [MSFT] (mrys_at_online.microsoft.com)
Date: 04/28/04
- Next message: Simon: "Re: Create a relationship node between tables with FOR XML Explicit"
- Previous message: Michael Rys [MSFT]: "Re: Create a relationship node between tables with FOR XML Explicit"
- In reply to: Jane: "FOR XML EXPLICIT Over Multiple Stored Procedures"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 28 Apr 2004 10:50:06 -0700
I don't think this is easily possible in SQL Server 2000. But you can do it
in SQL Server 2005 (formerly known as Yukon), out to be in beta in summer.
Note that you will not be able to use stored procs (since they use
side-effects to return data), but you will be able to use user defined
functions...
Best regards
Michael
"Jane" <fitzfreckle@yahoo.co.uk> wrote in message
news:b709383b.0404280323.46b933be@posting.google.com...
> Hi,
> I was wondering if the following was possible in VB/SQL?
>
> To call one stored procedure, eg. sp_Referrals, which in turn calls
> two stored procedures that each return their own XML structure. then
> to combine these two results sets, before returning them as one
> record/output/stream query result?
>
> For example,
>
> sp_CustomerSummary calls
>
> exec sp_GetReferrals @CustomerId
> exec sp_GetReferenceData 'Titles'
>
> which return the following XML respectively:
>
> <Referrals ID="1"><Reason>gfgdfgdfg</Reason><CreationDate>Apr 27 2004
> 2:01PM</CreationDate><PVDetails>gdfgfdgdfgdf</PVDetails><BenefitType>RP</BenefitType><LSCAction>Yes</LSCAction><PVCategory>Member
> of Household</PVCategory></Referrals>
>
>
> AND
>
> <Reference RefType="Titles"><Option Value="8" Text=""/><Option
> Value="7" Text="Dr"/><Option Value="9" Text="Miss"/><Option Value="5"
> Text="Mr"/><Option Value="6" Text="Mrs"/></Reference>
>
> they have different structures, obviously, but I would now like to
> combine these and return them as one XML as children of a single
> <RootNode> and as one recordset.
>
> Is this possible please?
>
> Thanks in advance
>
> Jane
- Next message: Simon: "Re: Create a relationship node between tables with FOR XML Explicit"
- Previous message: Michael Rys [MSFT]: "Re: Create a relationship node between tables with FOR XML Explicit"
- In reply to: Jane: "FOR XML EXPLICIT Over Multiple Stored Procedures"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|