package不能执行,package里面的procedure才能执行。

解决方案 »

  1.   

    execute immediate pkg_test.get('year=2003 and month=5');
      

  2.   

    declare
    v_rc pkg_test.myrctype;
    v_year jhhyyd.year%type;
    v_month jhhyyd.month%type;
    v_byyd jhhyyd.byyd%type;
    v_bjyd jhhyyd.bjyd%type; 
    begin
    pkg_test.get('year=2003 and month=5',v_rc);
    loop
    fetch v_rc into v_year,v_month,v_byyd,v_bjyd;
    exit when v_rc%notfound;
    dbms_output.put_line(v_year||v_month||v_byyd||v_bjyd);
    end loop;
    end;
    /