Home » RDBMS Server » Server Utilities » Conditional multiple loading by SQL Loader
Conditional multiple loading by SQL Loader [message #195888] Tue, 03 October 2006 00:24
Messages: 14
Registered: October 2006
Junior Member
Hi All,

I am trying to load data from flat files to multiple tables. However, the tables are related and I want that if a record is rejected while loading for one table, similar records should be rejected too.

For instance, I have two tables EMP_INFO and EMP_LEAVE in which I want to load data:

EmpID Fname Lname (EMP_INFO record)
34002 Rahul Agarwal
EmpID Casual Medical (EMP_LEAVE record)
34002 5 2

I want that if any record above fails, all records having 34002 EmpID should not be loaded.

However, I must mention that the table EMP_LEAVE does not contain records for all employees. This is the reason why I cannot arrange the flat file in a single-line structure and load in this way from CTL file:

INTO TABLE emp_info
Fname POSITION(12:22) CHAR)
INTO TABLE emp_leave

because for most employees leave columns would be blank. Only for those employees where leave is not blank, do I want the above conditional loading.

Any pointers much appreciated. Thanks.


Previous Topic: sql loader
Next Topic: How to import data in Oracle
Goto Forum:

Current Time: Thu Jul 27 02:31:18 CDT 2017

Total time taken to generate the page: 0.18015 seconds