这是什么情况啊?? 5
WD@whdb54>declare2var1varchar2(32767):='';3var2_textlong;4var3varchar2(38);5typeref_c...
WD@whdb54> declare
2 var1 varchar2(32767) :='';
3 var2_text long;
4 var3 varchar2(38);
5 type ref_cursor_type is ref cursor;
6 ref_cursor ref_cursor_type;
7 begin
8 for m in (select column_name from tab_dict where table_name='TB_OBJECT_1017' and col_type_flag=1) loop --------查找某一个
表的text 字段
9 open ref_cursor for select ob_object_id,m.column_name from TB_OBJECT_1017@wdd;
10 loop
11 fetch ref_cursor into var3,var2_text;
12 execute immediate 'update TB_OBJECT_1017 t1 set '|| m.column_name||'='||var2_text||' where t1.ob_object_id='||var3;
13 exit when ref_cursor%notfound;
14 end loop;
15 execute immediate 'commit';
16 close ref_cursor;
17 end loop;
18 end;
19 /
declare
*
第 1 行出现错误:
ORA-00911: invalid character
ORA-06512: at line 12 展开
2 var1 varchar2(32767) :='';
3 var2_text long;
4 var3 varchar2(38);
5 type ref_cursor_type is ref cursor;
6 ref_cursor ref_cursor_type;
7 begin
8 for m in (select column_name from tab_dict where table_name='TB_OBJECT_1017' and col_type_flag=1) loop --------查找某一个
表的text 字段
9 open ref_cursor for select ob_object_id,m.column_name from TB_OBJECT_1017@wdd;
10 loop
11 fetch ref_cursor into var3,var2_text;
12 execute immediate 'update TB_OBJECT_1017 t1 set '|| m.column_name||'='||var2_text||' where t1.ob_object_id='||var3;
13 exit when ref_cursor%notfound;
14 end loop;
15 execute immediate 'commit';
16 close ref_cursor;
17 end loop;
18 end;
19 /
declare
*
第 1 行出现错误:
ORA-00911: invalid character
ORA-06512: at line 12 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询