在做一个导入导出的东东,遇到一个问题,
表的情况是
用户 stiuser6n 有表 wp_info
用户 zyz2 有表 news
两张表,都有个大字段,类型是CLOB
我的逻辑是,读 wp_info的数据再插到news中,读一条插一条,
其中遇到很多问题,。。省略,最终,现在我采取这种做法,
两个存储过程,(都是属于zyz2用户的)
pro_import_all
这个主要代码是
--游标定义如下:
cursor cursor_stiuser6n_wp_info is
select t.id
from stiuser6n.wp_info t where rownum<=500;----AAAA
---------
open cursor_stiuser6n_wp_info;
loop
fetch cursor_stiuser6n_wp_info into id_;
exit when cursor_stiuser6n_wp_info%notfound;
--dbms_output.put_line( id_);
--dbms_output.put_line('pro_import_all读--' || id_);
pro_import_single(id_);--我在这里调用第二个存储过程
end loop;
--rollback;
close cursor_stiuser6n_wp_info;
第二个存储过程代码如下: