subject         part

stay Oracle in ,Oracle Insert or update CLOB Field report “ORA-01704: The string text is too long ” How to solve ?


          Answer section          

From the following 2 We need to think about solving the problem :

1、 If you insert SQL less , Then it can be handled manually . The method is to use PLSQL Developer Software , The order is :select * from Table name for update. In this way, the contents of related fields are directly copied to CLOB Field , Just submit at last. .

2、 If you insert SQL More , So you need to put all of them first SQL Statement into the table , Then on SQL Statement processing . First of all, we need to find the rules , There’s a pattern , And then use PL/SQL Block can be inserted or updated .

2  v_clobValue CLOB:= 'XXX'; -- Field contents , But the content in single quotation marks cannot exceed 4000 character
4  UPDATE  Table name  T SET T. Field name  = T. Field name || v_clobValue WHERE  Conditions ;