Home » SQL & PL/SQL » SQL & PL/SQL » where condition based on column value
where condition based on column value [message #359628] Mon, 17 November 2008 13:27 Go to next message
Messages: 17
Registered: October 2008
Junior Member
I got a scenario in oracle 10g that
where condition should be based on value of a column

for eg

not in condition for col5 should be based on col4 value and heres the query which i think should work for the scenario given
but taking too much time ..Just wanted to know whether it can be done in some other optimized way.

select col1,col2,col3 where (
(col4=1 and col5 not in ('yy','zz'))
(col4=2 and col5 not in ('cc','bb'))

Re: where condition based on column value [message #359632 is a reply to message #359628] Mon, 17 November 2008 13:38 Go to previous message
Michel Cadot
Messages: 64729
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It is OK.

Previous Topic: SP2-0158: unknown SET option "message"
Next Topic: Embedded SELECT statements
Goto Forum:

Current Time: Fri Apr 28 09:17:37 CDT 2017

Total time taken to generate the page: 0.06339 seconds