I have a situation like this
select col1, col2
from table1
where col1 = case when (booleanexp1) then a OR col1 = b
when (booleanexp1) then c OR col1 = d end
I mean I need to get where col1 = a or col1 = b
when booleanexp1 is TRUE,
but I get a syntax error? How is the right way to perform something like this?
Best Answer
Assuming two
booleanexp1
s is a misprint:PS.
not (booleanexp1)
is one possible option of(booleanexp2)
...