This topic is locked

Query needed

1/25/2011 10:52:34 AM
PHPRunner General questions
bbarker author

I have detail records with a year field. (YEAR)
I want to query all records for a VENDOR and get the YEAR value for the MOST RECENT record.
Example.
MASTER:

Vendor ID, etc etc.
DETAILS:

2004, Product, Weight

2010, Product, Weight

2007, Product, Weight
If I sort Year by DESC, then how do I select the value of the newest year? (2010)

I want to show on the LIST Page "Last Ordered".
Thanks!

P
procheck 1/28/2011

Hi Bill,
Have a look at this post. It might give you an idea on how to proceed.
http://www.asprunner.com/forums/topic/16036-simple-sql-problem/

bbarker author 1/28/2011

Thanks... I'll check it out and post my findings over the weekend.