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

Home -> Community -> Usenet -> c.d.o.server -> Re: DECODE Using a Date Comparison? Any ideas?

Re: DECODE Using a Date Comparison? Any ideas?

From: Mauro <sbffn_at_vgf.vg>
Date: Thu, 30 Jul 1998 15:25:46 GMT
Message-ID: <35c08fea.100941476@news>


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

Original text of this message

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