philzhou

导航

ORA-01704: string literal too long

update mkt_page_links
set longdescription = ' {some html text > 4000 char} '
where menuidno = 310;

(longdescription  type is clob)

execute this cmd against oracle database via OracleClient, you will get the following error.

 

ORA-01704: string literal too long

Cause: The string literal is longer than 4000 characters.

Action: Use a string literal of at most 4000 characters. Longer values may only be entered using bind variables.

 

solution:

DECLARE
  str varchar2(32767);
BEGIN
  str := 'Very-very-...-very-very-very-very-very-very long string value';
  update t1 set col1 = str;
END;

posted on 2013-08-22 16:23  philzhou  阅读(3447)  评论(0编辑  收藏  举报