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 -> Need advice on a SQL Loader project (binary problem)

Need advice on a SQL Loader project (binary problem)

From: Bob Hayden <bob.hayden_at_ljpc.com>
Date: 1997/07/18
Message-ID: <5qojkv$ksr@news.cerf.net>#1/1

Hello,

I am working on a project to load text and graphics files from an analytical application into an Oracle 7 database. The application generates a single text file and a single graphics file for each sample, which contains information that will populate 5 tables in Oracle. I have already written an app in C that dissects the (hundreds of) text files and generates 4 (one for each table) SQL Loader input files in delimeted format (with one row for each of the text files, containing info relative to that table). This part works fine, but the problem I have now is the graphics files.

My original plan was to write a C app that would cat all the binaries together, then I could run SQL Loader once to parse this one giant file and load records based on length. That was the plan before I found out the files are variable length. It looks like now I will need to run SQL loader once for each tiff file, since I can't specify the bytes. I also need to relate the graphics file to the appropriate sample (record in a table loader earlier), so my plan is to modify the tiff and add an extra few bytes in the beginning for the keys. If I can't do this, could I exec SQL Loader from the C app and pass it 3 run string parameters, key1, key2, and filename? So <gasp> to get to the point, will something like the following work?

--SQL Loader control file
--Load graphics into database

LOAD DATA
INFILE 'command-line-arg[1]' <--- What is proper syntax for here? APPEND
INTO TABLE graphics

(
graphic_id RAW(length),
sample_id RAW(length),
chrom RAW <--- length unknown? will it default to EOF )

--SQL Loader control file
--Load graphics into database

LOAD DATA
INFILE 'command-line-arg[1]'
APPEND
INTO TABLE graphics

(
graphic_id 'command-line-arg[2]',
sample_id 'command-line-arg[3]',
chrom RAW
)

Thanks,
-Bob Received on Fri Jul 18 1997 - 00:00:00 CDT

Original text of this message

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