Re: ms access query help You can try the follwing, this is Transact SQL, don't know if it will work
in MS Access.
Select top 20 from yourtable
order by invoice_no desc
This will get you the highest invoice numbers
Hope this is what you want.
Oscar...
"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
> |