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 |
When you run he report you have to get only that particular organization po numbers or item number how can do it?
In unix Schell sript what is very 1st line to be wriiten .
what is difference between po_headers_all and po_headers
in GL module specifing org_id or not?
what is the purpose of standard cost update?
What are the Standard Reports and Forms in HRMS?
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,
Difference between set of books id and ledger id in r12 ?
How is choreography different from orchestration?
What is FORWARD DECLARATION in Packages?
6 Answers British Telecom BT, HCL, Tech Mahindra,
tell me the scenarios of the independent in reports
Could any one tell me the steps of conversions and what kind of validations and exceptions do we use during this conversion? Please do answer in detail. what program do we write in user exit in reports?