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 |
please explain open interface import
Is that Possible To create package without Specification , If Yes Give any Examples
can we use commit in trigger? If yes how?
Tell me some thing about SQL-LOADER.
I want to print output in portrait style?where i have to change the settings?
What are the files we submit while your program move to testing instance?
in order to run utl_file package we need to give any specific path? if yes what is that?where u will run utl_package?
what is item status? name the related table.
How we print the multi language in report?can any one give me step bye step explanation.
2 Answers HCL, IBM, Tech Mahindra,
How many schemas we have? how many you have used?
what are the error tables in OM
What are different execution methods of executabls?