Re: Inserting BLOBs from files with the filename stored in another column

From: Jonathan Lewis <>
Date: Fri, 26 Oct 2012 09:39:21 +0100
Message-ID: <>

I assume the problem is finding code that allows you to read the list of files from the directory.

To do that from pl/sql I think you still need to write a little Java in the database - someone who is more familiar with the latest features of pl/sql may point out that I'm wrong, of course. Here's a link to a very old example of the method from Tom Kyte.

The thread started in 2000, so better read browse through the more recent years as well, rather than stopping at the first answer, in case there are updates and improvements mentioned.

Once you've got the list of files I assume you will have no problems with the relevant calls to the dbms_lob package.



Jonathan Lewis

Author: Oracle Core (Apress 2011)

<> wrote in message

| Hello all,
| we need to migrate article images into an existing table; the name of
each article's image file is stored in a column of table Articles, basically:
| --------
| IMG_FILENAME [varchar2(100)] | IMAGE [blob]
| I found nothing helpful so far on the web. Is there a simple way to do
this in PL/SQL or do I have to use an external script?
| Any help would be greatly appreciated.
Received on Fri Oct 26 2012 - 10:39:21 CEST

Original text of this message