USP_SEARCHLIST_WORKSTATION

Search for a workstation

Parameters

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

Definition

Copy


CREATE procedure dbo.USP_SEARCHLIST_WORKSTATION
(
    @NAME nvarchar(100) = null,
    @MACHINENAME nvarchar(255) = null,
    @MAXROWS smallint = 50
)
as
    set @NAME = coalesce(@NAME,'') + '%' ;
    set @MACHINENAME = coalesce(@MACHINENAME,'') + '%' ;

    select top(@MAXROWS)
        ID,
        NAME,
        MACHINENAME,
        DESCRIPTION
    from 
        dbo.WORKSTATION
    where
         (NAME like @NAME) and
         (MACHINENAME like @MACHINENAME)
    order by 
        NAME asc