Home » RDBMS Server » Server Utilities » Loading data in more than one table using SQL Loader
Loading data in more than one table using SQL Loader [message #71997] Tue, 18 February 2003 05:23 Go to next message
Arvind Holani
Messages: 2
Registered: September 2002
Junior Member
Hi,

Is it possible to load data from a CSV file in more than one table. I am having a csv files with 194 columns and mapping to 6 different tables in Oracle database.

For example, can we write a control file as follows:

LOAD DATA INFILE *
INTO TABLE emp, dept
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
(emp.EMPNO integer,
emp.ENAME char(10),
dept.DEPTNO integer,
dept.DNAME char(14)
)
BEGINDATA
1,"Arvind",21,"Software"
2,"Ramesh",22,"Project"

Thanx in advance.

Regards,
Arvind
Re: Loading data in more than one table using SQL Loader [message #71998 is a reply to message #71997] Tue, 18 February 2003 06:07 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
try this. you have to load the data selectively.
LOAD DATA 
INFILE 'file1'
INTO TABLE emp (....)
into table dept (....)

----------------------------------------------------------------------

else
creat a dumy table with requuuired columns
load data into this table.
write trigger or procedure to move respective data
from dummy table to emp and dept.

Previous Topic: urgent::dynamic sql in pro*C
Next Topic: drop datafile first then tablespace HELP
Goto Forum:
  


Current Time: Tue Dec 24 06:56:03 CST 2024