【问题标题】:Fetch Out Of Sequence ORA-01002从序列中取出 ORA-01002
【发布时间】:2016-06-09 06:47:52
【问题描述】:

您好,任何人都可以在下面检查并帮助我。我得到了 fetch out of sequence 错误并且 ref cur 值没有插入到对象类型中。

object (x,y,z)
type a is table of object

procedure a_procedure(a out a_ref cursor, b out b_ref cursor)is

x a := a();

begin
b_procedure(ref cursor)
if ref cursor%found then
loop
a.extend;
a(a.count) := object(null,null,null)
fetch ref cursor into a(a.count).x
                    a(a.count).y
                    a(a.count).y;
exit when b_refcur%notfound;
end loop;
end;
/

上下文:值不是从 b_procedure 的引用游标中获取的。我想从另一个过程中获取 ref 游标值并将该值提取到对象中。

【问题讨论】:

  • 你的 b_procedure 里面有什么?传递的 ref_cursor 是什么?

标签: plsql


【解决方案1】:
begin
b_procedure (ref_cursor);
if ref_cursor%is open then
fetch ref_cursor into r`enter code here`ecord;
collection_type.extend;
collection_type(collection_type.last):=object(record.value1),
                                             (record.value2),
                                              ...etc);
end if;
end;
/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-04
    • 2013-04-19
    • 2016-07-11
    • 1970-01-01
    • 2022-08-11
    • 2013-09-07
    相关资源
    最近更新 更多