create or replace procedure ProcedureName
is
cursor cur_test is
select * from table table_a
for update;begin
for rec_test in cur_test loop
update table_a
set post_mem = (select POST_JL
from table_b where TEL_NO = rec_test.TEL_NO )
where current of cur_test;
end loop;
commit;
end;
is
cursor cur_test is
select * from table table_a
for update;begin
for rec_test in cur_test loop
update table_a
set post_mem = (select POST_JL
from table_b where TEL_NO = rec_test.TEL_NO )
where current of cur_test;
end loop;
commit;
end;
解决方案 »
- 用PlSqlDeveloper远程访问Oracle11g
- oracle简单应用
- 在ORACLE 9I 中的full outer join 为什么在ORACLE 817中编译通不过?
- 全局数据库名称.数据库名称.SID是什么关系?
- Oracle9i 安装找不到主机IP地址?
- oracle733在WIN2000上的问题
- [求助]C#中用OracleClient连接Oracle时,连接字符串怎么写?
- 性能问题?
- oci的函数怎么可以找到帮助文档啊?
- enterprise manager怎么搜索不到节点?急
- 简单问题:一个number(10)的字段查询时显示1.040E+09,怎样让它完全显示?
- 如何将*.db数据库转成Oracle数据库?
执行后能把POST-MEM变成 如此格式吗?
200207FP;200208ZD;200209FP
from table_b where TEL_NO = rec_test.TEL_NO )是不是要改成 for loop 的形式, 谁能告诉我如何改呀 ,
执行后能把POST-MEM变成 如此格式吗: 200207FP;200208ZD;200209FP set post_mem = (select POST_JL
from table_b where TEL_NO = rec_test.TEL_NO )
是不是要改成 for loop 的形式, 加个变量什么的,谁能告诉我如何改呀 ,
Result varchar2(100);
cursor rad_cursor(v_id varchar2) is
select POST_JL from A
where TEL_NO=v_id order by POST_JL;
v_count Number;
begin
v_count:=0;
Result:='';
for v_sor in rad_cursor(p_id) loop
if v_count=0 then
Result:=v_sor.POST_JL;
v_count:=v_count+1;
else
Result:=Result||';'||v_sor.POST_JL;
end if;
end loop;
return(Result);
end get;
/update B set POST_MEM=(select get(TEL_NO) from A where POST_JL=B.POST_MEM)