UFN_BATCH_GETVALIDATIONREPORTID
Returns the validation report id for a given batch.
Return
Return Type |
---|
uniqueidentifier |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@BATCHID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_BATCH_GETVALIDATIONREPORTID(@BATCHID uniqueidentifier) returns uniqueidentifier
as
begin
declare @REPORTID uniqueidentifier;
select
@REPORTID=VALIDATIONREPORTID
from
dbo.BATCHTYPECATALOG
inner join dbo.BATCHTEMPLATE on BATCHTYPECATALOG.ID = BATCHTEMPLATE.BATCHTYPECATALOGID
inner join dbo.BATCH on BATCH.BATCHTEMPLATEID = BATCHTEMPLATE.ID
where
BATCH.ID = @BATCHID
return @REPORTID;
end