How to limit the number of rows in a query?

J

JackD

I must query the 10 most expensive items from a table of goods (>1000 items).
Can I limit somehow the numbe of rows in a query what makes a simple
descendant ordering select?
In many SQL based database systems I can use the "LIMIT 10" expression, but
I don't know how to makethis in Access.
 
T

Tom Ellison

Dear Jack:

Try:

SELECT TOP 10 Column1, Column2, . . .

The ORDER BY statement will be important in determining the choice of rows.

Tom Ellison
 
S

Sunday88310

In Query view click new and select the the tab Querys or Tables or Both.
Select the Table or Query with the information you want to limit to 10
From that table or Query list box select your fields and place them on the
grid
Next click sort Ascending or in your case dsending
Next click the criteria line and add the less than symbol then 10
Click the design button and you should get the 10 files from the greatest to
the least in cost. Good luck
 
D

david epsom dot com dot au

In query design view, set the 'max records' property.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top