WHEN clause in sqlloader ( cannot use IN?)
I would like to load my flat file but only for data that has:
'4000','4001','4002','4003','4004','4005','4006','4007'
My below file works great for loading just the '4000', but I cannot figure out how to include more variables.
I tried the IN clause, I tried the OR clause, I tried the AND clause ...
OPTIONS
( SKIP = 5,
ERRORS = 1000,
ROWS = 128,
DIRECT = TRUE,
PARALLEL = FALSE
)
LOAD DATA
INFILE 'rolling-5min.csv'
BADFILE 'load_pricing.bad'
DISCARDFILE 'load_pricing.dis'
DISCARDMAX 10000000
APPEND
INTO TABLE T_PRICING
WHEN MRKT_LOCTN_ID = '4000'
FIELDS TERMINATED BY ',' optionally enclosed by '"' TRAILING NULLCOLS
(
filler1 filler,
ENERGY_MKT_CD constant 'NE',
MRKT_LOCTN_ID CHAR,
MKT_PRICE_DT date 'HH24:MI:SS',
MKT_PRCNG_TYPE_CD constant '5M',
ENERGY_NBR CHAR,
CNGSTN_NBR CHAR,
MRGNL_LS_NBR CHAR,
LMP_NBR CHAR
)
Re: WHEN clause in sqlloader ( cannot use IN?)
WHEN (MRKT_LOCTN_ID = '4000') AND (MRKT_LOCTN_ID = '4001') AND...
Re: Re: WHEN clause in sqlloader ( cannot use IN?)
Quote:
Originally posted by TomazZ
WHEN (MRKT_LOCTN_ID = '4000') AND (MRKT_LOCTN_ID = '4001') AND...
I bet the result of the above expression will always be FALSE, won't it? So no rows will be loaded.... :p
Re: Re: Re: WHEN clause in sqlloader ( cannot use IN?)
Quote:
Originally posted by jmodic
I bet the result of the above expression will always be FALSE, won't it? So no rows will be loaded.... :p
:D :D :D
You won the bet!
I guess I am underslept today...
Re: Re: Re: WHEN clause in sqlloader ( cannot use IN?)
Quote:
Originally posted by jmodic
I bet the result of the above expression will always be FALSE, won't it? So no rows will be loaded.... :p
Correct!
I tried that and It did not work.
Yes, I am on 9i, but new to 9i features.