Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

SQL Server select statement based on max record date

I have three columns

user_addr_no, cust_purch_ord_no, and ord_dt

I need a table created that has

user_addr_no, ord_dt, and the cust_purch_ord_no based on that purchase order being IT'S most recent date.

so if the last date for store a was 7/1/2007 and store b had two, one on 7/1 and another on 8/3 then I would get only a single record for each

store a   7/1/2007    po#
store b   8/3/2007    po#
ASKER CERTIFIED SOLUTION
Avatar of Daniel Wilson
Daniel Wilson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial