Home » RDBMS Server » Server Utilities » Control file inside a control file????
Control file inside a control file???? [message #69690] Mon, 18 February 2002 07:24 Go to next message
Irina Dumitru
Messages: 7
Registered: February 2002
Junior Member
Hello everybody,
I have to load data from several tables in Access to Oracle. I have written a control file for each of them. Is it possible to load data with only one control file?
I have tried to write things like:
load data
infile X
into table X
fields terminated by etc
load data
infile Y
into table Y
but it doesn't work (maybe I don't put the right sign between the blocks).
Or should I write a certain line of code that will trigger another control file and so on?
Could someone please help me?
Thanks a lot,
Iri
Re: Control file inside a control file???? [message #69691 is a reply to message #69690] Mon, 18 February 2002 09:27 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
You can easily generate the control files tha the O/S script to lod them something like this:

create control file for each table...
spool &1.ctl
prompt LOAD DATA
prompt INFILE *
prompt INTO TABLE &&1
prompt REPLACE
prompt FIELDS TERMINATED BY '|'
prompt (
select decode(column_id,1,'',',') || lower(column_name)
from user_tab_columns
where table_name = '&&1';
spool off;

generate sqlload commands....
spool load.cmd
set pagesize 0 ...
select 'sqlldr userid=u/p contrl='||table_name||'.ctl'
from user_tables where table_name in ('EMP', 'DEPT');
spool off
Previous Topic: Re: Data imgration from MS SQL server
Next Topic: Using a filename as a parameter with sqlloader
Goto Forum:
  


Current Time: Mon Apr 29 09:10:27 CDT 2024