Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Case
http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a85397/expressi.htm#1029291
something like
SELECT AVG(CASE WHEN e.sal > 2000 THEN e.sal ELSE 2000 END) from emp e;
JP
On Tuesday 27 of May 2003 14:05, you wrote:
> Java supports "switch" statement.
>
> On 2003.05.27 05:39 Ofer Harel wrote:
> > Good morning,
> >
> > suppose I want to make this code in a procedure:
> > t1 & t2 are records in the procedure
> >
> > if t1.a=1 then t2.x=t2.x+1;;
> > elseif t1.a=2 then t2.y=t2.y+1;
> > elseif.....
> > end if;
> >
> > is there a better way, can it be done in case expression?
> >
> > Ofer
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > --
> > Author: Ofer Harel
> > INET: oharel_at_barak013.net.il
> >
> > Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> > San Diego, California -- Mailing list and web hosting services
> > ---------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).
>
> --
> Mladen Gogala
> Oracle DBA
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- Pruner Jan jan_at_pruner.cz http://jan.pruner.cz/ ----------------------------- On a quiet Night, you can hear the Windows machines reboot. -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jan Pruner INET: jan_at_pruner.cz Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Tue May 27 2003 - 08:54:54 CDT