type t_cursor is ref cursor;
c_hzinfo  t_cursor;
beginopen c_hzinfo for select select billno,104-to_number(substr(pui_idcard,7,2)) from :1 using v_month;
试一下

解决方案 »

  1.   

    open c_hzinfo for 'select billno,104-to_number(substr(pui_idcard,7,2)) from :1' using v_month;
      

  2.   

    type t_cursor is ref cursor;
    c_hzinfo  t_cursor;beginopen c_hzinfo for 'select billno,104-to_number(substr(pui_idcard,7,2)) from '|| v_month;
      

  3.   

    谢谢,我加上条件就不行,给出答案就给分,在线等
    where length(pui_idcard)=15 and substr(pui_idcard,7,1)>'0' 
    and substr(pui_idcard,7,1)<='9' and substr(pui_idcard,8,1)>='0' and substr(pui_idcard,7,1)<='9';