DROP PROCEDURE Tmp_Op_CustCardInsProc
GO
CREATE PROCEDURE Tmp_Op_CustCardInsProc
(
	@CORRNBR        int,
	@CARDPASSWORD	VARCHAR(60),
	@EXPIREDATE	SMALLDATETIME,
	@DESCRCUSTCARD	UD_DESCRIPCION
)
AS
BEGIN
    BEGIN TRAN

          INSERT INTO Tmp_Op_CustCard(CORRNBR,CARDPASSWORD,EXPIREDATE,DESCRCUSTCARD)
          VALUES(@CORRNBR,@CARDPASSWORD,@EXPIREDATE,@DESCRCUSTCARD)

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

    COMMIT TRAN

END

