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: 64139
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: Fri Dec 09 01:56:08 CST 2016

Total time taken to generate the page: 0.05928 seconds