UFN_APPUSER_HASBATCH

Returns true if the user owns a batch

Return

Return Type
bit

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN

Definition

Copy


create function dbo.UFN_APPUSER_HASBATCH (@ID uniqueidentifier)
returns bit
as
begin

    if (select count(id) from dbo.batch where appuserid = @ID and statuscode <> 2) > 0
    begin
       return 1;
    end

    return 0;

end