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 implicity cursor . When it fires . For which statement it will fire(Insert/update/delte). What is the attribute of implicity and explicity cursor oracle 9i. What is the Rec cursor.
How can a process be deployed in soa?
how to call report from oracle oracle apps11i?
what is difference between po_headers_all and po_headers
If there is any issue then whom do you report.(this is imp question for every interview)
HOW CAN U KNOW TABLE IS REGISTERD IN APPS?
where the accounting related data is stored ?
What is GLOBAL TEMPORARY TABLE and It's significance ?
What are the different components of soa suite?
What is template?
Oder of firing triggers in form
tell me the scenarios of the independent in reports