View Full Version : using SQL*LOADER, loading many tables from one control (ctl) file
Zvika Glickman
04-01-2004, 12:39 AM
DB: Oracle 9.2. Application: SQL*LOADER.
I have to load many tables.
I have just one ctl file that contains information on all the tables
(each table is different) and reference different data file for each
table.
I get syntax error when i start to define the second table in the ctl
file.
Is it allowed to do? How?
****** Control file start here ******
LOAD DATA
INFILE 'load_tst.dat'
INTO TABLE load_tst
TRUNCATE
( f1 POSITION(1:3),
f2 POSITION(4:6)
)
OPTIONS (SILENT=FEEDBACK,DIRECT=TRUE)
LOAD DATA
INFILE 'load_tst1.dat'
INTO TABLE load_tst1
TRUNCATE
( f1 POSITION(1:3),
f2 POSITION(4:6)
)
****** Control file finished here ******
** Error i get:
[vashti]<rotem> /users/arsi/zvika/rsi/tstload>sqlldr RSI/RSI@orasp
control=load_tst
SQL*Loader: Release 9.2.0.2.0 - Production on Wed Mar 31 15:12:58 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL*Loader-350: Syntax error at line 9.
Expecting keyword INTO, found keyword options.
OPTIONS (SILENT=FEEDBACK,DIRECT=TRUE)
Daniel Morgan
04-02-2004, 08:06 AM
Zvika Glickman wrote: DB: Oracle 9.2. Application: SQL*LOADER. I have to load many tables. I have just one ctl file that contains information on all the tables (each table is different) and reference different data file for each table. I get syntax error when i start to define the second table in the ctl file. Is it allowed to do? How? ****** Control file start here ****** LOAD DATA INFILE 'load_tst.dat' INTO TABLE load_tst TRUNCATE ( f1 POSITION(1:3), f2 POSITION(4:6) ) OPTIONS (SILENT=FEEDBACK,DIRECT=TRUE) LOAD DATA INFILE 'load_tst1.dat' INTO TABLE load_tst1 TRUNCATE ( f1 POSITION(1:3), f2 POSITION(4:6) ) ****** Control file finished here ****** ** Error i get: [vashti]<rotem> /users/arsi/zvika/rsi/tstload>sqlldr RSI/RSI@orasp control=load_tst SQL*Loader: Release 9.2.0.2.0 - Production on Wed Mar 31 15:12:58 2004 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. SQL*Loader-350: Syntax error at line 9. Expecting keyword INTO, found keyword options. OPTIONS (SILENT=FEEDBACK,DIRECT=TRUE)
You will find an example of how to do it here:
http://www.psoug.org/reference/sqlloader.html
look at demo9
--
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)
MyLounge.com Site Map
Forum:
Cars,
Cell Phone,
Database,
Games,
Home Improvement,
IT,
Music,
School,
Sports,
Web Design,
Web Server,
Weight Loss
The MyLounge.com forum is intended for informational use only and should not
be relied upon and is not a substitute for any advice. The information contained
on MyLounge.com are opinions and suggestions of members and is not a representation
of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for
the accuracy, completeness or usefulness of any postings or the qualifications
of any person responding. Please consult a expert or seek the services of an
attorney in your area for more accuracy on your specific situation. Please note
that our forums also serve as mirrors to Usenet newsgroups. Many posts you see
on our forums are made by newsgroup users who may not be members of MyLounge.com
Term of Service
vBulletin v3.0.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.