Larry Brister
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#
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.