How to insert data into two tables using single control file?
Answers were Sorted based on User's Feedback
Answer / rajiv
LOAD DATA
APPEND
DISCARDMAX 9999999
INTO TABLE UPLOAD_HDR
WHEN agreementno='~'
FIELDS TERMINATED BY ","
(
AGREEMENTNO CHAR(20),
FILENAME CHAR(30),
BATCHID constant 112)
INTO TABLE UPLOAD_TMP
WHEN agreementno <>'~'
FIELDS TERMINATED BY ","
TRAILING NULLCOLS
(
AGREEMENTNO POSITION(1) CHAR(20),
EMI_AMT INTEGER EXTERNAL(16),
BATCHID constant 112)
Is This Answer Correct ? | 10 Yes | 1 No |
Answer / emmanuel - tcs
A Small changes in above control file
Add below insert stmt to above CTL File
Insert into Table Tab_name_1 -- This is for one table
Insert into Table Tab_name_2 -- This is for Second Table
First mention first table column and mention second table
columns
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / bobbyiiit
Using "When"
we use "When" condition to load data into multiple tables.
Syntax:
Load Data infile '&1'
Insert into table table1
(
.
.
.
.
)
Insert into table table2
when <condiation>
(
.
.
.
);
Is This Answer Correct ? | 1 Yes | 0 No |
what is the use of anchors?
what is pick selection list generation report.
can we get profile values in report without using user exists is it possible how?
In thet custom.pll what are the events we can write.
What are file in oracle.
How we will receive the work from the client? what type of documents we will develop in the entire implementation project? plz tell me the total scinario?
2 Answers Deloitte, Intelligroup,
While registering the concurrent program we first do the executable concurrent program and then define it . So why we need to give the application name twice in executable and as well as definitions
I am insert in data to a table X .Which one is better while writing commit statement After each row inset or after all row insert to table.
what is the error you will get if field is referenced in wrong repeating frame?
what could be the problem if invoice_id is same in ap_invoices_all and ap_invoices_interface. while the Ord_id , invoice_num, and other things is diffrent .
How to call oracle database stored procedure from form in form coding ?
How will you get the concurrent program output as email?