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.
please explain open interface import
What is a value set? List its various types.
When loading data from staging table to interface table , how to reload the invalid record once again ?
The report output is 10 pages then how many times between pages report trigger will fire?
why r u move in the cus_top only why not move another top
You are working with interfaces if client doesnot give any flat then what will u do?
what are the receipt types in Po?
What is the Lookup's and what is the use of lookup's?
Difference between Bind and Lexical parameters?
What is the interface?
what is latest version in reports