Subject Re: [firebird-support] Select last - How to select latest data
Author Lester Caine
menjit_singh wrote:

> Hello all,
>
> What is the syntax to select the latest 30 days data and sort it from
> oldest date to most recent date? (please refer message id 26907,
> question about the same, but i need to change it a bit). I have
> tried :

Silly question, why not just use

WHERE DATE > ( CURRENT_DATE - 30 )
ORDER BY DATE ASC

30 days worth
As long as you have a DATE on each record ( or CAST from TIMESTAMP )

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.