Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Need Help with SQL - Repost
Hello Oracle Users,
I would like to write a query similar to the one below, but Oracle does not accept 'IF' statement. Is there anyother way to write a query similar to the one below.
select a.score , (If b.score in (11,12,13) then InActive=1), (If b.score NOT in (11,12,13) then Active=1), sum(b.Balance)
from OldTable a, NewTable b
group by a.score;
Thanks,
Anna Henson Received on Thu Jan 11 2001 - 16:17:21 CST