oracle存储过程拼',【求助】关于oracle存储过程'字符串拼接'
該樓層疑似違規已被系統折疊?隱藏此樓查看此樓
create or replace procedure p_dis_cause_sort
as
v_id disq_research_category_two.id%type;
v_typename disq_research_category_two.typename%type;
--v_typename disq_research_category_two.typename%type;
--創建光標
cursor v_cur is
select t.typename as t_typename, t.dis_id as dis_id
from disq_research_category_two t
where t.typename is not null
order by t.dis_id;
c_typename varchar(100);
c_id varchar(32);
begin
open v_cur;
loop
fetch v_cur into v_id,v_typename;
--查看是否有數據
if v_cur%found then
if c_id%found then
c_id := v_id;
if c_id = v_id
--(下面的語句是重點)存儲過程在執行下面的問題時出錯.. 請問 字段拼接 這樣寫不對么?
c_typename := c_typename || ';' || v_typename;
else
update disq_orbit v set v.dis_cause_sort = c_typename where v.id = v_id;
end if;
end if;
end if;
exit when v_cur%notfound;
end loop;
close v_cur;
end;
總結
以上是生活随笔為你收集整理的oracle存储过程拼',【求助】关于oracle存储过程'字符串拼接'的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: rhel5.8安装oracle10g,R
- 下一篇: oracle := 和=,oracle