UFN_SELECTION_CONSTITUENT_ALLPROSPECTRESEARCHCONSTITUENTS

Returns IDs of all constituents who do not have wealth updates disabled.

Return

Return Type
table

Definition

Copy


            CREATE function dbo.UFN_SELECTION_CONSTITUENT_ALLPROSPECTRESEARCHCONSTITUENTS()
            returns table
            as return
                select distinct
                    C.ID
                from dbo.CONSTITUENT C
                left join dbo.DISABLEDWEALTHUPDATES DWU on DWU.ID = C.ID
                where
                    C.ISORGANIZATION = 0 and
                    DWU.ID is null;