SQL*Loader : How to load based on the header-record [message #73950] |
Sun, 08 August 2004 12:46 |
shankar
Messages: 29 Registered: January 2002
|
Junior Member |
|
|
Hi,
Appreciate if someone can give me some directions on this.
I get data-files which has a particular identified on the 1st record( header ), based on which I've to load a constant for the 1st column of every row. How do I set in the control file.
Example :-
data_file_1
Oへ-aug-04�� -- format( company_id|date|row_count )
john saylor𞓄ܗ� --format( name|emp_id|salary )
larry ellissonә쐤� --format( name|emp_id|salary )
...
...
... -- 1000 such records
data_file_2
Sへ-aug-04ぺ
scott mcnealyә嗊�
john schwartzӚ嗊�
...
...
--10 such records
The table I want to load these 2, have these columns
Table A
Company_name
Emp_name
Emp_id
Run_date ( default to sysdate )
Now, all data-files will have only one identifier-record and in the 1st row. So in these examples, I've to set a constant as Oracle or Sun Microsystems based on the 1st record( header ) for every row inserted from that data-file. I need to embed all these in a single control-file to load data-files for different companies.
Thanks.
- Shankar.
|
|
|
|