Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL Loader - insert into multiple tables
Arvind
You don't need two file OR two control files. Instead just RTFM (Alan beat me to the punch, but here are the doc refs):
"To load multiple tables, you include one INTO TABLE clause for each table you wish to load"
Typically you'll use a record type - eg your CLN, CMP, etc - with a WHEN clause eg:
LOAD DATA
INTO TABLE TAB1
WHEN (1:3) = 'CLN'
( ... table 1 column/position defs ...)
INTO TABLE TAB2
WHEN (1:3) = 'CMP'
( ... table 2 column/position defs ...)
... etc
See case study 5:
http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96652/ch10.htm#1007219
HTH
Regards Nigel
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Dec 07 2006 - 06:48:42 CST
![]() |
![]() |