Hi,
I'm on 10.2.0.3 and got problem like this
create table big (id number , words varchar2(22));
insert into big values (1, 'aaa');
insert into big values (1, 'abc');
insert into big values (1, 'bbb');
insert into big values (1, 'ccc');
insert into big values(2, 'eee');
select * from big;
ID WORDS
---------- ----------------------
1 aaa
1 abc
1 bbb
1 ccc
2 eee
create table dic1 (data varchar2(22));
insert into dic1 values('aaa');
insert into dic1 values('bbb');
create table dic2 (data varchar2(22));
insert into dic2 values('eee');
SQL> select * from dic1;
DATA
----------------------
aaa
bbb
SQL> select * from dic2;
DATA
----------------------
eee
select * from big
where
exists (select null from dic1 where instr(words,data) > 0);
Now I want to compare big table with dic2 as well but only if column id from table big equals (id = 2) .
So I need kind of case statement with two exists subquery :
1- for dict1 and 2nd for dic2 but only if id = 2 .
Please advice.
Regards
GregG