Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Need Help with SQL

Need Help with SQL

From: Anna Henson <anna_henson_at_yahoo.com>
Date: Thu, 11 Jan 2001 14:08:48 -0800
Message-ID: <t5sbnrt3dun226@corp.supernews.com>

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)) as InActive, (If b.score NOT in (11,12,13) as Active, sum(b.Balance)

from OldTable a, NewTable b
group by a.score;

Thanks,

Anna Henson Received on Thu Jan 11 2001 - 16:08:48 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US