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

help finishing Paradox query

Status
Not open for further replies.

betts2008

Technical User
Nov 4, 2008
1
US
Hi,
I'm trying to run a query on a multi-record table that will tell me the two highest numeric values within the set of numeric values associated with each record ID. I've put together a set query that almost works. It is a three line query as follows:
File name Record ID Numeric Values
Set example ID _a
Set example ID <MAX _a,_b
Check Check >=Max _b

The problem is that I have duplicate maximum values in some records and this query obviously ignores these duplicates and finds the next lowest numeric value. for set b.
Also, for some reason, I sometimes get only one value returned rather that two for a given record ID. I have no idea why this is happening.
Can anyone help me work out these two problems?
Thanks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top