UFN_REVENUEBATCH_GETBUSINESSUNITS_FROMITEMLISTXML

Used to convert an xml string to a table

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@ITEMLISTXML xml IN

Definition

Copy


create function dbo.UFN_REVENUEBATCH_GETBUSINESSUNITS_FROMITEMLISTXML(@ITEMLISTXML xml)
    returns table as
    return (
        select
            T.c.value('(BUSINESSUNITCODEID)[1]','uniqueidentifier') AS 'BUSINESSUNITCODEID',
            T.c.value('(AMOUNT)[1]','money') AS 'AMOUNT',
         T.c.value('(BASECURRENCYID)[1]','uniqueidentifier') AS 'BASECURRENCYID',
           T.c.value('(REVENUESPLITBUSINESSUNITID)[1]','uniqueidentifier') AS 'REVENUESPLITBUSINESSUNITID'
        from @ITEMLISTXML.nodes('/BUSINESSUNITS/ITEM') T(c)
    )