Click to See Complete Forum and Search --> : WHEN clause


string
02-26-2003, 05:10 AM
Hi ! I'm interested in loading certain records in a fixed length input file, I know that it is possible to do that with a statement like :
" INTO TABLE SIEBEL.EIM_FN_CONTACT1 WHEN (1:1) = 'D' "

but I would like to specify more conditions using a "OR" instead of "AND" How can I do that ? I tried writing:

" INTO TABLE SIEBEL.EIM_FN_CONTACT1 WHEN (1:1) = 'D' AND (2:2)='E' OR (2:2) = 'F' OR (2:2) = 'G' "


this statement gives syntax errors. Anyone can help me ?=)

jmodic
02-26-2003, 05:34 AM
I assume you are talking about WHEN condition in SQLLoader's control file.

Unfortunately only the OR operator is supported in those. AFAIK this hasn't been changed in 9i either.

For your example, you'll probably have to change that WHEN statement into something like:

" INTO TABLE SIEBEL.EIM_FN_CONTACT1 WHEN (1:2) = 'DE' OR (1:2) = 'DF' OR (1:2) = 'DG' "