USP_BATCHAMPROIMPORTBATCHUSERMESSAGE_DELETEBYBATCHID

Auto-generated procedure to handle error/rejection/exception messages for the BATCHAMPROIMPORT batch message table

Parameters

Parameter Parameter Type Mode Description
@BATCHID uniqueidentifier IN
@CHANGEAGENTID uniqueidentifier IN

Definition

Copy
/*
Generated by Blackbaud AppFx Platform
Date:  9/1/2024 11:53:52 PM
Assembly Version:  Blackbaud.AppFx.Platform.SqlClr, Version=4.0.3800.0, Culture=neutral, PublicKeyToken=null
Copyright Blackbaud
*/
CREATE PROCEDURE dbo.USP_BATCHAMPROIMPORTBATCHUSERMESSAGE_DELETEBYBATCHID
(
@BATCHID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier
)

as

set nocount on;    

    declare @contextCache varbinary(128);

    if @CHANGEAGENTID is null
        exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output;

    set @contextCache = CONTEXT_INFO();

    set CONTEXT_INFO @CHANGEAGENTID;

    delete from dbo.BATCHAMPROIMPORTBATCHUSERMESSAGE where exists (select BATCHAMPROIMPORT.ID from dbo.BATCHAMPROIMPORT where BATCHAMPROIMPORT.ID = BATCHAMPROIMPORTBATCHUSERMESSAGE.ID and BATCHID = @BATCHID);

    if not @contextCache is null
        set CONTEXT_INFO @contextCache;

    return 0;