UFN_BATCH_GETID

Returns the batch id of a given batch number.

Return

Return Type
uniqueidentifier

Parameters

Parameter Parameter Type Mode Description
@BATCHNUMBER nvarchar(100) IN

Definition

Copy


CREATE function dbo.UFN_BATCH_GETID
(
    @BATCHNUMBER    nvarchar(100)
)
returns uniqueidentifier
with execute as caller
as
begin
    declare @ID uniqueidentifier;
    select @ID = ID from dbo.BATCH where BATCHNUMBER = @BATCHNUMBER;
    return @ID;
end