Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Decode
You can use DECODE along with SIGN to accomplish this. Example:
SELECT SUM(DECODE(SIGN(mydate - SYSDATE),1,1,0,1,-1,0)) FROM dual
this decode statement basically states that if mydate is >= to sysdate then the column is equal to 1 otherwise it is equal to 0
-- Posted via Mailgate.ORG Server - http://www.Mailgate.ORGReceived on Wed Apr 03 2002 - 10:29:17 CST
![]() |
![]() |