Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: DECODE Using a Date Comparison? Any ideas?
On Thu, 30 Jul 1998 15:14:48 GMT, mark_tortolano_at_dial.pipex.com wrote:
-snip-
>What I would like to do is ...
>I tried a DECODE that looked like this, but it doesn't work:-
>DECODE(((TO_DATE(datesuspendstart+numsuspendduration))>SYSDATE),1,0,0)
Try:
DECODE(sign(TO_DATE(datesuspendstart+numsuspendduration)-SYSDATE),
1,'greater than', 0,'equal to', 'less than')
--
Mauro.
(My return address is intentionally invalid; ROT13 is required. As someone already told this audience, my responses are not to be considered official technical support or advice.) Received on Thu Jul 30 1998 - 10:25:46 CDT
![]() |
![]() |