我使用简单的while循环来从一个表中检索注释,将注释拆分为每行75个字符并将其插入新表中。但是有些评论遇到异常,因为评论有单引号(')。知道如何纠正没有任何数据丢失吗?
Counter := 1;
while comments is not null LOOP
op :=substr(comments,1,75);
begin
insert into Comments_Splitted_TXT (id_comment,comm_no,COUNT_Comment,Comments)
values (COMMENTS_SPLITTED_SEQUENCE.currval,Comments_Splitted_TXT_SEQUENCE.NEXTVAL,Counter,op);
exception
when others then dbms_output.put_line(COMMENTS_SPLITTED_SEQUENCE.currval);
end;
comments:= substr(comments,76);
Counter :=Counter+1;
end loop;
错误讯息: