tags:

views:

106

answers:

1

How can I, in Oracle 11, insert large data (~100000 hex-digits) into Blob field, using sql command only (without any external data with load cluase or such).

update tablename set fieldname='AA';

Works - 1 byte;

update tablename set fieldname='AA...(4000 hex-digits)...AA';

Doesn't. Niether Concat helps; strings can't be larger than 4000 chars. Is there other way, using sql command only?

A: 

As far as I know it is not possible. What you can do is:

  1. select blob from table
  2. get blob from resultset
  3. get outputstream from blob
  4. write to stream
  5. flush and update blob in table
  6. commit

You should be able to replace steps 1-2 by creating a temporary blob and using that for writing and updating.

gpeche