with tmp as (select * from a)
open mycursor for select * from tmp;mycursor 是申明的动态游标,这样在存储过程中编译不通过的嘛,谁知道怎么弄啊?

解决方案 »

  1.   

    说明oracle根本就不支持这种语法了
      

  2.   

    open mycursor for with tmp as (select * from a)
     select * from tmp;
      

  3.   

    minitoy,我解释下啊,mycursor 是作为 out refcur 参数传进存储过程的,refcur是在包上申明的动态游标。
    我现在要在存储过程中把mycursor 返回。
      

  4.   

    大哥你不知道直接open mycursor for select * from a呢,干嘛多此一举呢?;
      

  5.   

    为什么直路你不走 偏的走弯路open mycursor for select * from a;
      

  6.   

    我晕倒了啊。wkc168写这个,with tmp as (select * from a) 我只是打个比方啊!!当然是比较复杂的SQL语句啊!!
    关键是解决问题!!你真牛B!!
      

  7.   

    open mycursor for with tmp as (select * from a)
     select * from tmp;
    这种方式是完全正确的,还有什么错?贴出错误信息。
      

  8.   

    --我555555
    open mycursor for with tmp as (select * from a) select * from tmp;
      

  9.   

    open mycursor for with tmp as (select * from a)
     select * from tmp;
    这样编译是能通过,可是我现在想对tmp对复杂的处理后再返回游标,现在这样写好写只能跟一句sql语句嘛!
      

  10.   

    open mycursor for select * from a;