USP_BANKCONSTITUENCY_DELETE

Executes the "Bank Constituency: Delete" record operation.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Input parameter indicating the ID of the record being deleted.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the delete.

Definition

Copy


                    CREATE procedure dbo.USP_BANKCONSTITUENCY_DELETE
                    (
                        @ID uniqueidentifier,
                        @CHANGEAGENTID uniqueidentifier
                    ) as
                        set nocount on;

                        if(select count(BANKACCOUNT.ID) from dbo.BANKACCOUNT where BANKACCOUNT.BANKID = @ID) > 0
                        begin
                            raiserror ('ERR_BANK_BANKACCOUNT',13,1);
                            return 0;
                        end

                        exec dbo.USP_BANK_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID;
                        return 0;