DROP PROCEDURE Tmp_Cust_LimitDelProc
GO
CREATE PROCEDURE Tmp_Cust_LimitDelProc
(
	@CORRNBR        int,
	@SITEID		UD_IDSITE

)
AS
BEGIN
    BEGIN TRAN

	  DELETE
	  FROM Tmp_Op_Cust_Limit
          WHERE CORRNBR=@CORRNBR AND SITEID=@SITEID

    IF (@@error!=0 OR @@rowcount=0)
    BEGIN
        RAISERROR  20000 'Error Eliminando en TMP_OP_CUST_LIMIT'
        ROLLBACK TRAN
        RETURN(1)
    
    END

    COMMIT TRAN

END


select * from customer