300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > oracle存储过程拼' 【求助】关于oracle存储过程'字符串拼接'

oracle存储过程拼' 【求助】关于oracle存储过程'字符串拼接'

时间:2018-11-14 07:23:09

相关推荐

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;

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。