UFN_SPONSORSHIPLOCATIONCLOSEPROCESS_PROGRAMMAPPINGS_FROMITEMLISTXML

Convert the sponsorship location close process program mappings from XML to table.

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@PROGRAMMAPPINGS xml IN

Definition

Copy


create function dbo.UFN_SPONSORSHIPLOCATIONCLOSEPROCESS_PROGRAMMAPPINGS_FROMITEMLISTXML(
    @PROGRAMMAPPINGS xml
)
returns table
as
return (
    select
        T.c.value('(FROMSPONSORSHIPPROGRAMID)[1]','uniqueidentifier') AS 'FROMSPONSORSHIPPROGRAMID',
        T.c.value('(TOSPONSORSHIPPROGRAMID)[1]','uniqueidentifier') AS 'TOSPONSORSHIPPROGRAMID',
        T.c.value('(TOSPONSORSHIPLOCATIONID)[1]','uniqueidentifier') AS 'TOSPONSORSHIPLOCATIONID'
    from @PROGRAMMAPPINGS.nodes('/PROGRAMMAPPINGS/ITEM') T(c)
)