Hi Tiago, you mean like this?
SELECT DAY FROM T WHERE DAY < '2007-12-04' ORDER BY DAY DESC LIMITBY 1 I remember this not working on Oracle 7.3.4 (yeah it is somewhat outdated) because Oracle would sort only AFTER limiting the result set. So, as a workaround this might not work on all databases. Andreas On Feb 16, 12:08 am, Tiago Almeida <[email protected]> wrote: > Can't you sort by day and get the first? > I don't know if max exists. > > Regards, > Tiago -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

