Please start any new threads on our new
site at http://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Our new SQL Server Forums are live!
Come on over! We've restricted the ability to create new threads on these forums.
Posting Yak Master
Flowing Fount of Yak Knowledge
Select T.ID,T.Date,T.Amt,Case When T.Date = '2012/04' then P.Price Else T.Price End as Price
from Table T
Select ID,MIN(Date) MinDate,MIN(Price) Price
Group by ID
)P on P.ID = T.ID and T.Date = P.MinDate