I have a table called Services which contains, among other fields, the
following:
ServiceID
AccountID
ServiceDate
There may be many service records for each account. I wish to select
for
each account the most recent service record.
I can write:
Select AccountID, Max(ServiceDate) As MaxOfServiceDate From Services
Group By AccountID
This gives me the most recent ServiceDate for each account BUT how do
I write some SQL which will also give me the ServiceIDs which have these
service dates?
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!