USP_CURRENCYSET_DELETE

Executes the "Currency Set: 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_CURRENCYSET_DELETE
                    (
                        @ID uniqueidentifier,
                        @CHANGEAGENTID uniqueidentifier
                    )
                    as
                        set nocount on;

                        if exists
                        (
                            select
                                1
                            from
                                dbo.CURRENCYSET
                            where
                                CURRENCYSET.ID = @ID
                                and CURRENCYSET.ISAPPUSERDEFAULT = 1
                        )
                            begin
                                raiserror('BBERR_CURRENCYSETISDEFAULTFORAPPUSER : The default currency set cannot be deleted.', 13, 1);
                                return 1;
                            end

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