Sherwin,
When doing this kind of date operations, I always prefer to
use the days.
Try doing something along the lines of:
> AND l.log_time <= CURRENT - 1 UNITS MONTH <---This's the chap
AND l.log_time <= CURRENT - 30 UNITS DAY
When you use month, there is the question of what output
do you expect from the following Select statement?
SELECT extend("1999-03-31",year to day) - 1 units month FROM systables where
tabid = 1
My version of Informix, 7.31, reports error:
-1267: The result of datetime computation is out of range
HTH
Tino
> -----Original Message-----
> From: owner-informix-list@iiug.org
> [mailto:owner-informix-list@iiug.org]On Behalf Of Sherwin Jaleel
> Sent: Wednesday, September 15, 1999 10:46 AM
> To: informix-list@iiug.org
> Subject: I need a Date!
>
>
> Hello Folks,
> I need to delete records for a table that have dates that are older
> than one month from the today's date. The querry I cooked up is as
> below. Am I right. Please help.
> "SELECT a.applic_id,
> a.status,
> l.event,
> FROM application a,
> audit_log l
> WHERE a.applic_id BETWEEN 1 AND 10000
> bla, bla, bla...
> AND l.log_time <= CURRENT - 1 UNITS MONTH <---This's the chap
> giving me a head ache.
>
> Thanks a ton.
> sherwin
>
>