Loading conditionally ! [message #71561] |
Fri, 22 November 2002 15:04 |
raman
Messages: 66 Registered: February 2000
|
Member |
|
|
Can I get data from a flat file into multiple tables conditionally using SQL*LOADER?
Like:
If a row already exists in the tables then update the row else append to the table from flat file
Please let me know if I am not clear!
thankyou,
-Raj
|
|
|
Re: Loading conditionally ! [message #71666 is a reply to message #71561] |
Thu, 12 December 2002 14:55 |
snehal
Messages: 8 Registered: October 2000
|
Junior Member |
|
|
Look at the following control file:
LOAD DATA
INFILE *
REPLACE
INTO TABLE emp
WHEN empno != ' '
( empno POSITION(1:4) INTEGER EXTERNAL,
ename POSITION(6:15) CHAR,
deptno POSITION(17:18) CHAR,
mgr POSITION(20:23) INTEGER EXTERNAL
)
INTO TABLE proj
WHEN projno != ' '
( projno POSITION(25:27) INTEGER EXTERNAL,
empno POSITION(1:4) INTEGER EXTERNAL
)
I hope that solves your problem
|
|
|