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

	  UPDATE Tmp_Op_CustCard
	  SET   EXPIREDATE=@EXPIREDATE,
		DESCRCUSTCARD=@DESCRCUSTCARD
          WHERE CORRNBR=@CORRNBR AND CARDPASSWORD=@CARDPASSWORD

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

    COMMIT TRAN

END

