title: oracle clob: ORA-01461 can bind a LONG value only for insert into a LONG column
body: <p>I see an error while trying to persist in a oracle table named TEST_DATA :</p>
  <pre><code>ORA-01461: can bind a LONG value only for insert into a LONG column
  </code></pre>
  <p>Following is TEST_DATA schema:</p>
  <p><a href="https://i.stack.imgur.com/oU09K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oU09K.png" alt="enter image description here" /></a></p>
  <p>This is the sql generated:</p>
  <blockquote>
  <p>Error : 1461, Position : 11, Sql = merge into &quot;TEST_DATA&quot; t using
  (select :1  as &quot;ID&quot;,:2  as &quot;USER_ID&quot;,:3  as &quot;ACTION&quot;,:4  as
  &quot;TSTAMP&quot;,:5  as &quot;SOURCE&quot;,:6  as &quot;ENTITY_ID&quot;,:7  as &quot;PAYLOAD&quot; from
  sys.dual) s on (t.&quot;ID&quot;=s.&quot;ID&quot;) when matched then update set
  t.&quot;USER_ID&quot;=s.&quot;USER_ID&quot;, t.&quot;ACTION&quot;=s.&quot;ACTION&quot;, t.&quot;TSTAMP&quot;=s.&quot;TSTAMP&quot;,
  t.&quot;SOURCE&quot;=s.&quot;SOURCE&quot;, t.&quot;ENTITY_ID&quot;=s.&quot;ENTITY_ID&quot;,
  t.&quot;PAYLOAD&quot;=s.&quot;PAYLOAD&quot; when not matched then insert (&quot;USER_ID&quot;,
  &quot;ACTION&quot;, &quot;TSTAMP&quot;, &quot;SOURCE&quot;, &quot;ENTITY_ID&quot;, &quot;PAYLOAD&quot;) values
  (s.&quot;USER_ID&quot;, s.&quot;ACTION&quot;, s.&quot;TSTAMP&quot;, s.&quot;SOURCE&quot;, s.&quot;ENTITY_ID&quot;,
  s.&quot;PAYLOAD&quot;), OriginalSql = merge into &quot;TEST_DATA&quot; t using (select ?
  as &quot;ID&quot;,? as &quot;USER_ID&quot;,? as &quot;ACTION&quot;,? as &quot;TSTAMP&quot;,? as &quot;SOURCE&quot;,? as
  &quot;ENTITY_ID&quot;,? as &quot;PAYLOAD&quot; from sys.dual) s on (t.&quot;ID&quot;=s.&quot;ID&quot;) when
  matched then update set t.&quot;USER_ID&quot;=s.&quot;USER_ID&quot;,
  t.&quot;ACTION&quot;=s.&quot;ACTION&quot;, t.&quot;TSTAMP&quot;=s.&quot;TSTAMP&quot;, t.&quot;SOURCE&quot;=s.&quot;SOURCE&quot;,
  t.&quot;ENTITY_ID&quot;=s.&quot;ENTITY_ID&quot;, t.&quot;PAYLOAD&quot;=s.&quot;PAYLOAD&quot; when not matched
  then insert (&quot;USER_ID&quot;, &quot;ACTION&quot;, &quot;TSTAMP&quot;, &quot;SOURCE&quot;, &quot;ENTITY_ID&quot;,
  &quot;PAYLOAD&quot;) values (s.&quot;USER_ID&quot;, s.&quot;ACTION&quot;, s.&quot;TSTAMP&quot;, s.&quot;SOURCE&quot;,
  s.&quot;ENTITY_ID&quot;, s.&quot;PAYLOAD&quot;), Error Msg = ORA-01461: can bind a LONG
  value only for insert into a LONG column</p>
  </blockquote>
  <p>PAYLOAD column is basically to store image data. So while some images are getting stored fine, others are having this issue. So I suspect issue is with images, but error is telling something different.</p>