USP_SEARCHLIST_MEMBERSHIPPROGRAM

For Basic Membership to help find the ID of the membership program

Parameters

Parameter Parameter Type Mode Description
@NAME nvarchar(100) IN Name
@MAXROWS smallint IN Input parameter indicating the maximum number of rows to return.

Definition

Copy


CREATE procedure dbo.USP_SEARCHLIST_MEMBERSHIPPROGRAM
(
    @NAME nvarchar(100) = null,
    @MAXROWS smallint = 500
)
as
    set @NAME = COALESCE(@NAME,'') + '%' ;

    select top(@MAXROWS)
        ID,
        NAME
    from 
        dbo.MEMBERSHIPPROGRAM
    where
         (NAME LIKE @NAME) and
         ISACTIVE = 1
    order by 
        NAME asc