> SELECT date_effective FROM your_table WHERE date_effective <= (now() + '3
years ago')
That looks good.
If date_effective is a datetime - should be date_effective::datetime if as
Andrew said date_effective is a date field, I guess.
Also your inequality is the wrong way round for things less than or equal to
3 years old, which is what I thought Andrew wanted.
I think it's a bit faster than the age() construction, too.
----------------------------------------------------------------
Moray.McConnachie@computing-services.oxford.ac.uk