Restricting rows in a query result

dabbler

Registered User.
Local time
Today, 22:38
Joined
Dec 19, 2002
Messages
12
Hi guys,

I'm trying to restrict the results of my query by a crude rowcount method.

My existing sql query says "select customerid, date, item
from sales where date = 01/01/2003"

The trouble is there are tons of sales for this date. I know there are other ways of restricting this query but I wish to add a where clause which states something like "restrict to first 5 results".

In Oracle SQL I can add a clause saying "where rownum<6" and this will just show the first 5 results. Is there a corresponding function I can use in Access?

I've searched and searched and I can't seem to find it so any help would be appreciated!!

Cheers
 
select Top 5 customerid, date, item
from sales where .....
 
excellent thanks for that!
 

Users who are viewing this thread

Back
Top Bottom