How to insert data into two tables using single control file?

Answers were Sorted based on User's Feedback



How to insert data into two tables using single control file?..

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

How to insert data into two tables using single control file?..

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

How to insert data into two tables using single control file?..

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

Post New Answer

More Oracle Apps Technical Interview Questions

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.

2 Answers   IBM,


please explain open interface import

2 Answers  


What is a value set? List its various types.

0 Answers  


When loading data from staging table to interface table , how to reload the invalid record once again ?

6 Answers   Accenture,


The report output is 10 pages then how many times between pages report trigger will fire?

1 Answers   IBM,


why r u move in the cus_top only why not move another top

4 Answers   Wipro,


You are working with interfaces if client doesnot give any flat then what will u do?

8 Answers   Wipro,


what are the receipt types in Po?

2 Answers   Evosys, UST,


What is the Lookup's and what is the use of lookup's?

3 Answers   TCS,


Difference between Bind and Lexical parameters?

3 Answers  


What is the interface?

3 Answers  


what is latest version in reports

8 Answers  


Categories
  • Oracle Apps Technical Interview Questions Oracle Apps Technical (547)
  • Oracle Apps Financial Interview Questions Oracle Apps Financial (793)
  • Oracle Apps Manufacturing Interview Questions Oracle Apps Manufacturing (53)
  • Oracle Apps HRMS Interview Questions Oracle Apps HRMS (169)
  • Oracle Apps CRM Interview Questions Oracle Apps CRM (9)
  • Oracle Apps SCM Interview Questions Oracle Apps SCM (141)
  • Oracle Install Base Interview Questions Oracle Install Base (62)
  • Oracle Service Contracts Interview Questions Oracle Service Contracts (101)
  • Oracle Apps AllOther Interview Questions Oracle Apps AllOther (114)