USP_APPUSER_CURRENTSEARCHCOUNT

This function returns the number of current searches for an application user given its ID

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN
@NUMSEARCHES int INOUT

Definition

Copy


            create procedure dbo.USP_APPUSER_CURRENTSEARCHCOUNT(
                @ID uniqueidentifier,
                @NUMSEARCHES int = null output
            ) 
            as begin
                set nocount on;

                select @NUMSEARCHES = count(ID) from dbo.WPSEARCHHISTORY where APPUSERID = @ID and STATUSCODE not in (3,4,5);

                return 0;
            end;