Home » RDBMS Server » Server Utilities » Sql loader insert into multiple table failing
Sql loader insert into multiple table failing [message #73980] Fri, 13 August 2004 13:23 Go to next message
Amol
Messages: 12
Registered: June 2001
Junior Member
Hello ,
I am having below control file , trying to load into dept and emp table but sqlldr is loading into dept table only not in emp.

can u please advise if any thing is wrong in the control file
===========================
Load
infile *
Replace
into table dept
when deptno !=''
(deptno position(1:2) char,
dname position(4:6) char,
loc position(8:10) char
)
into table emp
when empno !=''
(empno position(12:13) char,
ename position(15:19) char
)

BEGINDATA

10 FIN NAG 40 Ashok
20 PAY BOM 50 Amol
30 HUM DEL 60 Anil
=====================

Thanks & Regds

Amol
Re: Sql loader insert into multiple table failing [message #73983 is a reply to message #73980] Sat, 14 August 2004 21:24 Go to previous message
Barbara Boehmer
Messages: 9101
Registered: November 2002
Location: California, USA
Senior Member
It works fine for me:

scott@ORA92> host sqlldr scott/tiger control=test.ctl

scott@ORA92> select * from dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 FIN            NAG
        20 PAY            BOM
        30 HUM            DEL

scott@ORA92> select * from emp;

     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
        40 Ashok
        50 Amol
        60 Anil


What version of Oracle are you running? How are you running SQL*Loader? What does your SQL*Loader log file say?
Previous Topic: unix variables in control file
Next Topic: Export from Oracle 9i, for import on Oracle 8i
Goto Forum:
  


Current Time: Wed Dec 25 07:03:47 CST 2024