Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: BLOB data

Re: BLOB data

From: Dmitry <support_at_ispirer.com>
Date: Sat, 16 Nov 2002 17:36:55 +0200
Message-ID: <ar5ojb$fcijh$1@ID-75577.news.dfncis.de>


Hi,

In addition to programming languages like C/C++/Java etc, you can use Oracle SQL Loader.

For example, for given table

CREATE TABLE blob1
(col1 VARCHAR2(100),
 col2 BLOB);

create a text file, containing

image1 name, image1.jpg
image2 name, image2.jpg
image3 name, image3.jpg
image4 name, image4.jpg

...

Specify real image files instead of imageN.jpg and fill other columns.

Then create a control file for SQL Loader:

LOAD DATA
INFILE 'blob1.txt'
INTO TABLE BLOB1
INSERT
FIELDS TERMINATED BY ',' TRAILING NULLCOLS (COL1 OPTIONALLY ENCLOSED BY '"',
 COL2_FILE FILLER OPTIONALLY ENCLOSED BY '"',  COL2 LOBFILE (COL2_FILE) TERMINATED BY EOF NULLIF COL2_FILE='') Then run SQL Loader:

sqlldr userid=usr/usr control=blob1.ctl log=blob1.log

It will load your images to an Oracle database

Best regards, Dmitry

--
http://www.ispirer.com/products - Database migration tool for Oracle, DB2,
MS SQL Server, Sybase and MySQL.


"Butt, Naseem [CAR:7622:EXCH]" <nbutt_at_americasm01.nt.com> wrote in message
news:ar0pj9$60q$1_at_bcarh8ab.ca.nortel.com...

> Can someone help me to understand how ti import images into an Oracle
table.
> I have created the table using the BLOB datatype to store the
images....need
> o understand the SQL code to import the data ?
>
> Thanks,
>
> Naseem
>
>
Received on Sat Nov 16 2002 - 09:36:55 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US