Subject Re: [firebird-support] Retrieve the older date
Author Ann W. Harrison
Carlos Arguilar wrote:
>
> I need doing a 'select' in a SP. This statment must return the older date of
> a date field. If the record with the older date isn't suitable, so I need
> the second older date and so on until end of the table, if necessary.

Something like

select first 1 <date field> from <table>
where <condition>
order by <date field> desc

Regards,


Ann