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

Top 4 records for each patient

Status
Not open for further replies.

AKMonkeyboy

IS-IT--Management
Feb 4, 2002
141
US
I have two tables that I'll eventually need to join, tblPatients and tblProcedures.

I only want to see the top 4 records for each patient in tblProcedures (some patients have well over 4 procedures). Of course I have a PatientID field to use to join the two tables.

What would be the best way to do this? I know how to limit total number of records, but I do not know how to limit records using another field (am I making any sense?).

Thanks in advance for any help.

Monkey

Give a man a fish, and you feed him for a day.
Teach a man to fish, and you feed
him for life.
Send a man to Tek-Tips and the poor sap can find out how to fish on his own, and learn more by doing it.
 
the top 4 records for each patient
With which sort order ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for your quick response - What would I do without Tek-tips?

I was able to find something that worked quite nicely for me. Remou posted an answer to a similar question in thread701-1120739 (sorry, don't know how to post a link to that).

Monkey

Give a man a fish, and you feed him for a day.
Teach a man to fish, and you feed
him for life.
Send a man to Tek-Tips and the poor sap can find out how to fish on his own, and learn more by doing it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top