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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top 2 choices ?

Status
Not open for further replies.

Noah114

Technical User
Mar 31, 2005
59
US
I have a query that pulls in our clients name, and a running sum of all the pharmacies they using count patients. Is there a way to pull the clients name, and only the top two pharmacies being utilized in a query?
 
Have a look at the TOP keyword in SQL - also available from the query properties.

Note that you cannot combine TOP with DISTINCTROW - in that case you need to create one query with distinctrow or groupings, and base another query on that one to select the top 2.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top