-
returning most recent record for group of IDs
I know this should be easy, but we must be idiots here. Assume you have two tables, orderitem and orderstatus. OrderItem has a unique key for each item ordered and a host of other information. Orderstatus has the unique key of the OrderItem and a statusname, i.e. order made, inventory ordered, etc. and a date of the status. So each orderitem will have multiple entries in Orderstatus. We need a query that will return all the information in OrderItem AND the latest Orderstatus entry for that particular Orderitem. Any help with the sql statement would be appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|