UFN_SITEID_MAPFROM_REVENUEID_BULK

Returns a table of revenue and each site within that revenue

Return

Return Type
table

Definition

Copy


            CREATE function [dbo].[UFN_SITEID_MAPFROM_REVENUEID_BULK]()
            returns table as

            /*
            Returns a row for each revenue and each site within that revenue
            */

            return(
                    select distinct
                        REVENUESPLIT.REVENUEID as ID,
                        REVENUESPLITSITE.SITEID
                    from dbo.REVENUESPLIT
                    inner join dbo.UFN_SITEID_MAPFROM_REVENUESPLITID_BULK() as REVENUESPLITSITE on REVENUESPLITSITE.ID = REVENUESPLIT.ID
            )