UFN_BATCH_GETDELETEOPERATIONID
This function returns the record operation id to use when deleting a given batch.
Return
Return Type |
---|
uniqueidentifier |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@BATCHID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_BATCH_GETDELETEOPERATIONID
(
@BATCHID uniqueidentifier
)
returns uniqueidentifier
as
begin
declare @result as uniqueidentifier
select
@result = BATCHDELETERECORDOPERATIONID
from
dbo.BATCHTYPECATALOG
inner join dbo.BATCHTEMPLATE on BATCHTEMPLATE.BATCHTYPECATALOGID = BATCHTYPECATALOG.ID
inner join dbo.BATCH on BATCH.BATCHTEMPLATEID = BATCHTEMPLATE.ID
where
BATCH.ID = @BATCHID;
return @result
end