本帖最后由 lihuinihao6315 于 2013-04-09 17:03:53 编辑

解决方案 »

  1.   


    declare
        P_Where VARCHAR2(10) :='1=1'; ---------查询条件
        cur_out  sys_refcursor;  --记录集游标
        cursor atype is select 除了默认日期那列都要 from A;
        p_row atype%rowtype;
    begin
        P_Excute(P_Where,cur_out);--执行存储过程 得到游标记录
        loop
            fetch cur_out into p_row;
            exit when cur_out%notfound;
            insert into A(默认日期那列,其余列...) values(sysdate,p_row.col1,p_row.col2......);
        end loop;
        close cur_out;
        commit;
    end;