USP_SEARCHLIST_FEEDALERTINSTANCE
Search for a feed alert instance.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@MAXROWS | smallint | IN | Input parameter indicating the maximum number of rows to return. |
@NAME | nvarchar(100) | IN | Name |
@ALERTTYPEID | uniqueidentifier | IN | Alert type |
Definition
Copy
CREATE procedure dbo.USP_SEARCHLIST_FEEDALERTINSTANCE
(
@MAXROWS smallint = 500,
@NAME nvarchar(100) = null,
@ALERTTYPEID uniqueidentifier = null
)
as
set @NAME = dbo.UFN_SEARCHCRITERIA_GETLIKEPARAMETERVALUE(@NAME, 0, null);
select top(@MAXROWS)
INSTANCE.ID,
INSTANCE.NAME,
ALERTTYPE.NAME as ALERTTYPENAME
from dbo.FEEDALERTINSTANCE as INSTANCE
inner join dbo.ALERTTYPE on INSTANCE.ALERTTYPEID = ALERTTYPE.ID
where ((@NAME is null) or (INSTANCE.NAME like @NAME)) and
((@ALERTTYPEID is null) or (INSTANCE.ALERTTYPEID = @ALERTTYPEID))
order by INSTANCE.NAME asc