Wednesday, July 22, 2009

Load images using SQL loader:

The following code for ctl(control) file will load images into an oracle table using sqlloader.
load data
infile image.csv
into table image1
append
fields terminated by ','
(
imageid,
filename,
image_data lobfile(filename) terminated by eof
)

The infile will mention the source data what’s the name of the file to be loaded and it should look like this :

1,image010.jpg
2,image020.jpg

The following command should be used to load the images:

Sqldr username/password@DB control=image.ctl

No comments:

Powered By Blogger