Dec 12, 2001 #1 raji96 Programmer Aug 7, 2001 64 US How can i redo the below query without sub query. Select tab1.first from table1 tab1 where tab1.first not in (select tab2.first from table2 tab2) Basically i want to select a particular field from table one where the is no match in the table 2. --thanks
How can i redo the below query without sub query. Select tab1.first from table1 tab1 where tab1.first not in (select tab2.first from table2 tab2) Basically i want to select a particular field from table one where the is no match in the table 2. --thanks
Dec 12, 2001 #2 karluk MIS Nov 29, 1999 2,485 US I think the "minus" operator is just what you need: select first from tab1 minus select first from tab2; Upvote 0 Downvote
I think the "minus" operator is just what you need: select first from tab1 minus select first from tab2;
Dec 13, 2001 #3 lewisp Programmer Aug 5, 2001 1,238 GB or..... SELECT distinct tab1.first FROM table1 tab1, table2 tab2 WHERE tab1.first = tab2.first(+) AND tab2.first IS NULL Upvote 0 Downvote
or..... SELECT distinct tab1.first FROM table1 tab1, table2 tab2 WHERE tab1.first = tab2.first(+) AND tab2.first IS NULL