I would like to accomplish the following without having to construct the MaxDetailTS view:
View MaxDetailTS:
SELECT Member_Id, MAX(TS) AS Ts
FROM dbo.SmtDetail
GROUP BY Member_Id
View DetailView:
SELECT SmtDetail.*
FROM dbo.SmtDetail INNER JOIN
dbo.MaxDetailTs ON
dbo.SmtDetail.Member_Id = dbo.MaxDetailTs.Member_Id AND
dbo.SmtDetail.TS = dbo.MaxDetailTs.Ts
Is there a more efficient and/or neater way to accomplish this?
TIA
Peter Pirker
Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?
(Woody Allen)