Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top Ten Customer

Status
Not open for further replies.

helmi

Technical User
Mar 10, 2003
18
0
0
SG
I wanna create a query showing only the top ten customer(which means not more than ten records).
How do I do it?
 
You need to use TOP 10 and ORDER BY in your query SQL.

eg.

SELECT TOP 10 tblCustomer.ID FROM tblCustomer
ORDER BY tblCustomer.ID

This would select the top ten customers based on Customer ID
There are two ways to write error-free programs; only the third one works.
 
Add a Top 10 immediately after the Select word:

Select Top 10 FieldList From...

Or...in your query properties, set the Top Values property to 10 (or whatever)...


Good luck

[pipe]
Daniel Vlas
Systems Consultant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top