continue if ina sql loader [message #307877] |
Thu, 20 March 2008 04:10 |
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 #308299 is a reply to message #307929] |
Sun, 23 March 2008 23:49 |
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 #308502 is a reply to message #308299] |
Mon, 24 March 2008 10:07 |
|
Barbara Boehmer
Messages: 9102 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
)
|
|
|