USP_SIMPLEDATALIST_DISTINCTMEMBERSHIPLEVELNAME
Returns a distinct list of membership level names.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@INCLUDEINACTIVE | bit | IN | INCLUDEINACTIVE |
Definition
Copy
CREATE procedure dbo.USP_SIMPLEDATALIST_DISTINCTMEMBERSHIPLEVELNAME
(
@CURRENTAPPUSERID uniqueidentifier,
@INCLUDEINACTIVE bit = 0
)
as
set nocount on;
select distinct
MEMBERSHIPLEVEL.NAME as VALUE
from
dbo.MEMBERSHIPPROGRAM
inner join
dbo.MEMBERSHIPLEVEL on MEMBERSHIPLEVEL.MEMBERSHIPPROGRAMID = MEMBERSHIPPROGRAM.ID
where
dbo.UFN_SITEALLOWEDFORUSER(@CURRENTAPPUSERID, MEMBERSHIPPROGRAM.SITEID) = 1
and (@INCLUDEINACTIVE = 1 or MEMBERSHIPLEVEL.ISACTIVE = 1)
order by
VALUE;
return 0;