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 -> DECODE Using a Date Comparison? Any ideas?

DECODE Using a Date Comparison? Any ideas?

From: <mark_tortolano_at_dial.pipex.com>
Date: Thu, 30 Jul 1998 15:14:48 GMT
Message-ID: <35c08dc3.21495312@news.supernews.com>


Hi,

I'm wanting to create a view that has in it a flag that determines whether a user in my mailing list application is currently suspended. The user can select to be suspended from receiving mail, at which point, values are entered to two fields in their user record:-

NUMSUSPENDDURATION: number of days until sending should resume DATESUSPENDSTART: the date that they requested the suspension to start at

What I would like to do is have a calculated field in the view that will show a 1 if the user is under suspension (ie. both NUMSUSPENDDURATION and DATESUSPENDSTART are set, and that those two fields added together are greater than SysDate). I tried a DECODE that looked like this, but it doesn't work:-

DECODE(((TO_DATE(datesuspendstart+numsuspendduration))>SYSDATE),1,0,0)

Any ideas?

Thanks in advance,

Mark Tortolano Received on Thu Jul 30 1998 - 10:14:48 CDT

Original text of this message

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