Home » SQL & PL/SQL » SQL & PL/SQL » Inserting a directory of images into a table of blobs (Oracle 11g, Windows)
Inserting a directory of images into a table of blobs [message #333801] Mon, 14 July 2008 08:24 Go to next message
goldfish74
Messages: 1
Registered: July 2008
Junior Member
Hi,

I'm really hoping someone can help with this - as I don't know where to start with it!

I have a directory of small image files in jpg format which I need to populate a table with.

These image files are stored with a naming convention of <productID>.jpg

My tables are in the following format:
product {
  productID     varchar(10)
  ...
  mediaID       number(10)
}

media {
  mediaID       number(10)
  ...
  image         blob
}

So, I need to read in each image, then from the file name, get the productID, and look up the product table with this to get the mediaID.

If this is 0, then create a new row on the media table with the image blob (the mediaID has a sequence to automatically insert to the next number), and then to update the product table with the mediaID number.

If the mediaID > 0, then it just needs to update the blob with the image.

Any help on this would be much appreciated...
Re: Inserting a directory of images into a table of blobs [message #333813 is a reply to message #333801] Mon, 14 July 2008 08:55 Go to previous message
Michel Cadot
Messages: 64617
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
DBMS_LOB is a starting point, then follow the links.

Regards
Michel
Previous Topic: Complex Report using SQL*PLUS
Next Topic: New Features 8i/9i
Goto Forum:
  


Current Time: Tue Mar 28 04:59:02 CDT 2017

Total time taken to generate the page: 0.13432 seconds