SQL Loader - Multiple Update [message #143007] |
Tue, 18 October 2005 14:07 |
MU_Leno
Messages: 1 Registered: October 2005
|
Junior Member |
|
|
I am looking to use the SQL loader to update and archive data in the same table.
Here is what I have in a possible ‘addr’ table:
(
Key POSITION(1:4) INTEGER EXTERNAL,
ID POSITION(6:8) INTEGER EXTERNAL,
Current POSITION(10) CHAR,
ADDRESS POSITION(12:32) CHAR
)
Looks like:
Key ID CURRENT ADDRESS
0052 001 Y 123 Fake St.
After a successful update, I want to change the “Current?” entry while adding a new row to the table.
Key ID CURRENT ADDRESS
0052 001 N 123 Fake St.
0053 001 Y 725 N. 18th St.
Does anyone know how to code this in the control file? I think I would need a WHEN statement to pull the key from record 1 then do the update?
Thanks!
|
|
|
Re: SQL Loader - Multiple Update [message #143008 is a reply to message #143007] |
Tue, 18 October 2005 14:13 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
sqlldr cannot do an update.
what you can do is
using sqlldr load the data into similiar addr_staging table.
then using sql means update data in addr table using data in addr_staging table .
|
|
|