UFN_MEMBERSHIP_GETTOTALACTIVEMEMBERS

Returns the total number of active members for the organization

Return

Return Type
int

Definition

Copy


        CREATE function dbo.UFN_MEMBERSHIP_GETTOTALACTIVEMEMBERS()
        returns integer
        with execute as caller
        as begin
            return(
                select count(M.ID) TOTALMEMBERS
                from dbo.MEMBER M
                inner join dbo.MEMBERSHIP MS on M.MEMBERSHIPID = MS.ID
                where MS.STATUSCODE = 0 and M.ISDROPPED = 0
            )
        end