Home » RDBMS Server » Server Utilities » SQL*LDR (Oracle)
SQL*LDR [message #427488] Thu, 22 October 2009 20:35 Go to next message
sandeep.blacktrack
Messages: 1
Registered: October 2009
Junior Member
My CTL file follows

-- ORACLE Ver 8, SQL*load script to load table "emp204"
-- WJM, Oct 09;
-- Rev 1 Oct 07 File references: quote a path+filename if not a local .dat file
LOAD DATA
INFILE *
INTO TABLE emp204 WHEN tab = tab1
(E_PK position(01:01) char,
DNO position(02:02) char
)

INTO TABLE dept204 WHEN tab = tab2
(
D_PK position(01:01) char,
MGRSSN position(02:02) char
)

INTO TABLE emp_j204 WHEN tab = tab3
(
E_PK position(01:01) char,
JOB_PK position(02:02) char
)

INTO TABLE emp_j_t204 WHEN tab = tab4
(
E_PK position(01:01) char,
JOB_PK position(02:02) char,
TASK_PK position(03:17) varchar
)

BEGINDATA
tab1|/xx/abd/fff/kkk1.dat
tab2|/xx/abd/fff/kkk2.dat
tab3|/xx/abd/fff/kkk3.dat
tab4|/xx/abd/fff/kkk.dat



When i try to load the data i get this ERROR

SQL*Loader: Release 10.2.0.1.0 - Production on Thu Oct 22 18:14:08 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL*Loader-350: Syntax error at line 7.
Expecting ")", ":" or "-", found "(".
(


Can anyone please help me Sad
Re: SQL*LDR [message #427514 is a reply to message #427488] Fri, 23 October 2009 00:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Which one is line 7?
What is tab tab1 tab2 tab3?

Regards
Michel
Re: SQL*LDR [message #427625 is a reply to message #427488] Fri, 23 October 2009 10:50 Go to previous message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
sandeep.blacktrack wrote on Fri, 23 October 2009 03:35

INTO TABLE emp204 WHEN tab = tab1

This kind of lines are suspicions; according to documentation (search for "Choosing Which Records to Load" section), a character string should be enclosed into single quotes (i.e. ... WHEN tab = 'tab1').
Previous Topic: Gather Stats while IMPDP
Next Topic: How to Load the data from single file to Multiple tables using SQL* Loader
Goto Forum:
  


Current Time: Thu Apr 18 19:57:01 CDT 2024