UFN_REVENUE_GETTRIBUTES

This SQL function returns all tributes for a given revenue record.

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@REVENUEID uniqueidentifier IN

Definition

Copy


            create function dbo.UFN_REVENUE_GETTRIBUTES
            (
                @REVENUEID uniqueidentifier
            )
            returns table
            as 
            return (
                select 
                    REVENUETRIBUTE.ID,
                    REVENUETRIBUTE.TRIBUTEID as TRIBUTEID,
                    REVENUETRIBUTE.AMOUNT,
                    TRIBUTE.DESIGNATIONID
                from 
                    dbo.REVENUETRIBUTE
                inner join
                    dbo.TRIBUTE on REVENUETRIBUTE.TRIBUTEID = TRIBUTE.ID
                where 
                    REVENUETRIBUTE.REVENUEID = @REVENUEID
            )