The title probably doesn't make much sense, so I'll try to be descriptive here in the subject.
Consider 2 tables in MSSQL2005:
Cases table:
id int,
caseNo string
Events table:
id int,
caseID int,
eventDate date/time
I need a select statement for a view which will return single rows of:
cases.caseNo, events.eventDate (date part only)
They are related/joined by events.caseID = cases.id
many to one. There are multiple event records per case records. I want the resultset to be single caseNo
with the latest/most recent value of events.eventDate.
Thanks in advance.