Fix Oracle ROWNUM usage