A Unique Constraint on PartNumber, EffDate would eliminate that possibility.
From: [email protected] [mailto:[email protected]] On Behalf Of Bill Downall Sent: Thursday, October 09, 2014 2:01 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Getting the most recent row based on dates On Thu, Oct 9, 2014 at 2:44 PM, Dan Goldberg <[email protected]<mailto:[email protected]>> wrote: Hmm, I will have to see if this runs faster. Thx Dan, It will not be any faster than the example I gave you. It might be the same. The one I gave you could trigger an error code if there happen to be two or more rows with the same partnumber on the same max (effdate). To prevent that, you could add "AND LIMIT = 1" at the end of the WHERE clause (after the close parenthesis.

