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

Home -> Community -> Usenet -> c.d.o.misc -> Re: *DECODE* to implement IF condition???

Re: *DECODE* to implement IF condition???

From: Richard Kuhler <noone_at_nowhere.com>
Date: Wed, 31 Oct 2001 06:34:34 GMT
Message-ID: <_XMD7.11270$D5.2691057@typhoon.san.rr.com>


how about...

select decode(col4,
'ABC', case when date1 < sysdate and date2 > sysdate

     then 'DEF YES' 
     else 'DEF NO' end,

'DEF', case when date1 < sysdate and date2 > sysdate
then 'DEF YES' else 'DEF NO' end,

'NEITHER ABC NOR DEF')

from t1

Richard Received on Wed Oct 31 2001 - 00:34:34 CST

Original text of this message

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