USP_SEARCHLIST_BBNCSITEPAGESBYEVENT
Search for BBNC site pages by Friends Asking Friends event
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@NAME | nvarchar(100) | IN | Name |
@MAXROWS | smallint | IN | Input parameter indicating the maximum number of rows to return. |
@EVENTID | uniqueidentifier | IN | Event |
Definition
Copy
CREATE procedure dbo.USP_SEARCHLIST_BBNCSITEPAGESBYEVENT
(
@NAME nvarchar(100) = null,
@MAXROWS smallint = 500,
@EVENTID uniqueidentifier = null
)
as
set @NAME = COALESCE(@NAME,'') + '%' ;
select top(@MAXROWS)
SP.ID,
SP.PAGENAME as NAME
from
dbo.SitePages SP
left join dbo.EVENTEXTENSION EX on SP.ClIENTSITESID = EX.CLIENTSITESID
where IsTemplatePage = 0 and (SP.PAGENAME LIKE @NAME) and (EX.EVENTID = @EVENTID or @EVENTID is null)
order by
SP.PAGENAME asc