Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
phrankbooth
Posting Yak Master
162 Posts |
Posted - 2013-04-28 : 12:24:12
|
Hi,From the table below, if Project.Date group has a Fail and Success, I'd like to keep the Fail row, but if single row (like the rest,) then keep that row regardless of Status.Project|Date|StatusHLM|20130422|Fail <<if Success and Fail in same date, Keep FailHLM|20130422|SuccessHLM|20130423|FailHLM|20130424|SuccessHLM|20130425|FailHLM|20130426|SuccessThanks!--PhB |
|
singularity
Posting Yak Master
153 Posts |
Posted - 2013-04-28 : 13:21:57
|
[code]select project, [date], min(status) as statusfrom yourtablegroup by project, [date][/code] |
|
|
|
|
|