DROP PROCEDURE Tmp_Op_CustBadgeInsProc
GO
CREATE PROCEDURE Tmp_Op_CustBadgeInsProc
(
	@CORRNBR        int,
	@BADGE		VARCHAR(12)
)
AS
BEGIN
    BEGIN TRAN

          INSERT INTO Tmp_Op_CustBadge(CORRNBR,BADGE)
          VALUES(@CORRNBR,@BADGE)

    IF (@@error!=0)
    BEGIN
        RAISERROR  20000 'Error insertando en TMP_OP_CUSTBADGE'
        ROLLBACK TRAN
        RETURN(1)
    
    END

    COMMIT TRAN

END

