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 |
|
Angelorush
Starting Member
3 Posts |
Posted - 2010-11-23 : 12:00:06
|
| Employee ColorEmployee1 BlueEmployee2 RedEmployee3 BlueEmployee3 Redend resultEmployee1 Blue OnlyEmployee2 Red OnlyEmployee3 Blue and Redthanks in advance |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Angelorush
Starting Member
3 Posts |
Posted - 2010-11-23 : 12:14:32
|
| i've tried case statements but once i get a hit on the first statement the results only shows this Employee1 Blue OnlyEmployee2 Red OnlyEmployee3 Blue Only |
 |
|
|
Angelorush
Starting Member
3 Posts |
Posted - 2010-11-23 : 12:35:19
|
| case when color = 'Blue' then 'Blue Only' when color = 'Red' then 'Red Only' when color in ('Blue','Red') then 'Both'end |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|