USP_DATALIST_OTHERMEMBERS

Displays a list of other members for a membership.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Input parameter indicating the context ID for the data list.

Definition

Copy


                CREATE procedure dbo.USP_DATALIST_OTHERMEMBERS
                (
                    @ID uniqueidentifier
                )
                as
                    set nocount on;

                    declare @MEMBERSHIPID uniqueidentifier;
                    select @MEMBERSHIPID = MEMBERSHIPID from dbo.MEMBER where ID = @ID;

                    select
                        ID,
                        NF.NAME,
                        ISPRIMARY
                    from
                        dbo.MEMBER
                        outer apply dbo.UFN_CONSTITUENT_DISPLAYNAME(MEMBER.CONSTITUENTID) NF
                    where
                        MEMBERSHIPID = @MEMBERSHIPID
                        and ID <> @ID
                        and ISDROPPED = 0
                    order by
                        [NAME];

                    return 0;