PLSQL CLOB maximum length error
<p>My code/PLSQL function  is as below:</p>

<pre><code>function build_update(p_table_name varchar2) --function to build update statement
return varchar2
    as
     t_string CLOB;                 
begin
for i in (select column_name from ALL_TAB_COLS where table_name = p_table_name)
 loop
  t_string := t_string || i.column_name||'='||' b' ||'.'||i.column_name||',';   

 end loop;
   t_string := to_clob(to_char(substr(t_string, 1, instr(t_string, ',', -1)-1)));
                return t_string;

end;
</code></pre>

<p>While creating dynamic sql update to be used in merge, it is showing error as can bind a LONG value only for insert into a LONG column.</p>

<p>Even if an using CLOB, it cant take more characters.
I have only 152 columns in my table, and for them I am making column_nameA=B.column_nameA.</p>

<p>Please help</p>