Re: SQL Loader - insert into multiple tables

  • From: Nigel Thomas <nigel_cl_thomas@xxxxxxxxx>
  • To: arvind.kumar2@xxxxxxxxxxx, oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 7 Dec 2006 04:48:42 -0800 (PST)

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

Other related posts: