Home » RDBMS Server » Server Utilities » continue if ina sql loader
continue if ina sql loader [message #307877] Thu, 20 March 2008 04:10 Go to next message
tinujose
Messages: 4
Registered: March 2007
Location: kochi
Junior Member
Hi,
pls get me a solution fro this ..
when i used the below given script for sql loader it gives the syntax error when i remove the key word preserve if works.
what is the problem with this syntax. is ther any ather way to use preserve with continueif


THE SCRIPT
----------------------

LOAD DATA
INFILE tes.csv
CONTINUEIF THIS PRESERVE (1:1) ='H' INTO table XXCHK_TEST1 WHEN (1:1) ='H' FIELDS TERMINATED BY ','
(
EMPNO ,
NAME ,
PWORD
)

ERROR
----------------------
SQL*Loader-350: Syntax error at line 3.
Expecting "(", found keyword preserve.
CONTINUEIF THIS PRESERVE (1:1) ='H' INTO table XXCHK_TEST1 WHEN (1:1
Re: continue if ina sql loader [message #307929 is a reply to message #307877] Thu, 20 March 2008 07:11 Go to previous messageGo to next message
Dhruva
Messages: 9
Registered: August 2007
Junior Member
If you can post some record from your data file then it will be easy to understand the error.
Re: continue if ina sql loader [message #308299 is a reply to message #307929] Sun, 23 March 2008 23:49 Go to previous messageGo to next message
tinujose
Messages: 4
Registered: March 2007
Location: kochi
Junior Member
hi
sorry for not providing the data...
sample data is listed below

H,10,
babu,JKF788
H,11,sobi,hh7638
H,12,
rakinpr,kji777
T,13,
fabil,7777
Re: continue if ina sql loader [message #308348 is a reply to message #308299] Mon, 24 March 2008 01:59 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And what is table description?

Regards
Michel
Re: continue if ina sql loader [message #308502 is a reply to message #308299] Mon, 24 March 2008 10:07 Go to previous message
Barbara Boehmer
Messages: 8625
Registered: November 2002
Location: California, USA
Senior Member
Since you need to preserve the first field, in order to check for whether or not it = 'H', but you are not loading it into a column, you need to declare it as a filler:

LOAD DATA
INFILE tes.csv
CONTINUEIF THIS PRESERVE (1:1) ='H' INTO table XXCHK_TEST1 WHEN (1:1) ='H' FIELDS TERMINATED BY ','
(
filler1 FILLER,
EMPNO ,
NAME ,
PWORD
)
Previous Topic: import in 10g
Next Topic: inserting a default date, when input date is blank, via SQL LOADER
Goto Forum:
  


Current Time: Sat Dec 03 16:14:52 CST 2016

Total time taken to generate the page: 0.06568 seconds