loop
EXIT WHEN cur%NOTFOUND;
fetch ...

解决方案 »

  1.   

    代码详情如下:  高手门,帮帮我,那错了?         
       v_sql := 'SELECT * FROM mytable WHERE baseid='||v_pk;
       OPEN cur FOR v_sql;
       LOOP
         FETCH cur INTO v3_row;
     EXIT WHEN cur%NOTFOUND;
     vvv :=vvv||''''||v3_row.TITLE||''';'''||v3_row.MEMONAME||''',';
       END LOOP;
       CLOSE cur;
      

  2.   

    ORA-01007 variable not in select listCause: A reference was made to a variable not listed in the SELECT clause. In OCI, this can occur if the number passed for the position parameter is less than one or greater than the number of variables in the SELECT clause in any of the following calls: DESCRIBE, NAME, or DEFINE. In SQL*Forms or SQL*Report, specifying more variables in an INTO clause than in the SELECT clause also causes this error.Action: Determine which of the problems listed caused the problem and take appropriate action.看起来和你的代码没啥关系啊
    你确信就是这段代码?