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

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 26 Oct 2012 09:39:21 +0100
Message-ID: <pp6dnQU21uS10RfNnZ2dnUVZ8lqdnZ2d_at_bt.com>


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.

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584

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.

-- 

Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com/all_postings

Author: Oracle Core (Apress 2011)
http://www.apress.com/9781430239543

<leichtenfels_at_gmail.com> wrote in message 
news:e5eb5615-b184-46f9-9292-ed851aa90d9e_at_googlegroups.com...

| 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:
|
| ARTICLES
| --------
| 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