Re: ms access query help Well Dave, It's actually quite simple. All you would have to do is this:
select top 20 * from [the table name] order by [the ID column] desc
The reason you want to order by DESC b/c it list the column from the highest
numbers to the lowest. So, you'll get the top 20 highest records.
Wei
"SkunkDave" <dave_casserly@totalise.co.uk> wrote in message
news:bfhkd4$gc4$1@hercules.btinternet.com...
> I have a table that has numerical ID.
>
> I want a query that will get the 20 highest IDs. So in other words the
> query would return the last 20 results entered.
>
> What would even be better is if they were distinct entries by another
> column, but it still returned 20 results.
>
> Can you specify in SQL how many results you want?
>
> Thanks
> Dave
>
> |