DROP PROCEDURE Tmp_Op_CustBadgeDelProc
GO
CREATE PROCEDURE Tmp_Op_CustBadgeDelProc
(   	@CORRNBR        int,
	@BADGE		VARCHAR(12)
)

AS
BEGIN
    BEGIN TRAN

    DELETE
      FROM  TMP_OP_CUSTBADGE
      WHERE BADGE=@BADGE AND
	    CORRNBR=@CORRNBR


    IF (@@error!=0)
    BEGIN
        RAISERROR  20002 'Error al Eliminar en TMP_OP_CUSTBADGE'
        ROLLBACK TRAN
        RETURN(1)
    
    END

    COMMIT TRAN

    RETURN(0)
END