--- Mark Tessier <m_tessier(at)sympatico(dot)ca> wrote:
> Hi,
>
> My question is hopefully a simple one: If I have
> several rows, each containing a date field, and I
> want to select the row that has the date closest to
> today's date, what would be the syntax for carrying
> that out.
>
select * from tablename order by abs(current_date -
datefield) desc limit 1;
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com