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 does appl_top directory contain?
What repots or concurrent program run to transfer data from Inventory to GL.
How to send the e-mail notification in XML Pub Report?
what are the prerequisite set ups for inter organization transaction?
What do you understand by a set of books?
How many typres of Purchase order and what are those.
Which oracle applications pl/sql standard apis you are familiar, have you used most of them?
What are the files you have used in the part of Conversion and Interfaces?
How do u identity its name of report?
we have 4 managers if one person logon the system automatically displays his siganature and name how?
what is meant by Table space?
i have 3 parameters like p1,p2,p3.In p1 i have 2 parameters like a,b.if pass parameter 'a' p2 should be enable and p3 should be disable then if pass parameter 'b' the vice versa.
1 Answers IBM, Sierra Atlantica,