How Can I Do This

ecuevas

Registered User.
Local time
Today, 05:54
Joined
Jun 18, 2007
Messages
74
How can I make a querie that finds the ten most expensive items in my table?:confused:
 
SELECT TOP 10 field1, field2
FROM TableName
ORDER BY PriceField DESC
 
I don't really understand what you are trying to say. This is what I have so far:

Field: Cost
Table: TBL-Inventory
Sort:
Show: Checked
Criteria:
Or:​

What exactly would I type in?
 
SELECT TOP 10 TBL-Inventory.cost
FROM TBL-Inventory
ORDER BY TBL-Inventory.cost DESC

Your also going to want to include the field with the name of the item in this.
 
It didn't work. I might have typed it into the wrong place. I put TOP 10 TBL-Inventory.Cost as the field. I also tried putting into Table but that didn't work either
 
Right click on the title bar and select "SQL view" and then copy and paste the text.
 
No delete what is already there and replace it with what I have written
 
It says "syntax error in FROM clause" when I try to close it.
 
Try this:

SELECT TOP 10 [TBL-Inventory].cost
FROM [TBL-Inventory]
ORDER BY [TBL-Inventory].cost DESC
 
It works but now I can't see any of the other fields.
 
Just go back to the design view and add the fields you need back in.
 

Users who are viewing this thread

Back
Top Bottom