为了解决ORA-01704错误,可以采取以下几种方法: 使用预编译语句(PreparedStatement): 预编译语句通过将参数与SQL语句分开处理,避免了在SQL语句中直接包含过长的字符串。这样可以有效避免ORA-01704错误。以下是一个使用Java的PreparedStatement来插入长字符串的示例: java String longString = "这是一个非常长的字符串......
AND pro.project_manager not in (select info.user_id from cdc_user_info info where info.user_name in ('fff')) 拼接的字符串超长导致“string” 抛异常。减少了拼接字符后,顺利执行。 注意:在拼接sql时,用于某类型字段的拼接,需要注意其长度。事先预测一下需要拼接的字符最长会达到多少,超长的话可以使用...
oracleORA-01704:stringliteraltoolong问题分析 今天使⽤sql在oracle直接insert update⼀个表时,出现ORA-01704: string literal too long的错误,我们的sql是 update mall_config a set a.category_info='|标准件:1040140,1035382,1036586,1035383,1032451,1032469,141903,1036587,1044047,1035380,1035385,1455,...
(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 ...
"流处理读取CLOB:\n"+result); } 其中Clob 类型转换为String的自定义方法如下 private Stri ...
char(x) 保持定长字符串 varchar2(x) 保持变长字符 clob 保持大字符串(最大4G) 建议用clob blob 和bfile 保持二进制数据
Clob字段在SQL语句中一般可当作字符串处理。 但当字符串的长度>4000时,会出现errorORA-01704: string literal too long错误。 因为SQL语句超过了允许的长度,在PL/SQL中可能限制更短。 处理方法: java中可引用preparedStatement。PL/SQL中则可使用变量。 tomcat6.0和web
When inserting string via Insert.Into on Oracle, we are facing this issue when a string value is over 4000 chars : https://stackoverflow.com/questions/13945710/error-ora-01704-string-literal-too-long Collaborator jzabroski commented Feb 17, 2020 • edited @PhenX Thanks - I think this Sta...
Error Number: INSERT INTO "FEATURE" ("FEATURE_ID", "RESIDUES") VALUES ('1526', 'Here I input a very long string > 4000 charachters') If I try this sql statement in oracle using command line, I get the error: "ERROR: ORA-01704: string literal too long" ...
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); ...