HunterBoss Posted April 22, 2010 Posted April 22, 2010 I need to find the most recent instance of a client's order record and return only that one. Order table could have zero, one or multiple (but more than likely never more than 50) order records. For those with multiple order records, I need to return only the most recent. I can do the find based on just the client ID. That's the easy part. Based on other threads I've read, I see that the script can sort the found set. The part I'm confused about is how do I show just the first one? Thanks Christopher
Zcast Posted April 22, 2010 Posted April 22, 2010 "I can do the find based on just the client ID. That's the easy part. Based on other threads I've read, I see that the script can sort the found set. The part I'm confused about is how do I show just the first one?" Do you want the first one, or the most recent? Since you can do the find based on client, just sort by order date using descending order. That will show you the "last, or most recent" order placed.
Søren Dyhr Posted April 22, 2010 Posted April 22, 2010 Could it be something in the vicinity of this you're seeking? http://www.kevinfrank.com/download/classroom-averages.zip --sd
HunterBoss Posted April 22, 2010 Author Posted April 22, 2010 That did it. A little tweak here and there but I'm certain this is what I'm looking for. Thank you Christopher
Recommended Posts
This topic is 5328 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now