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 |
|
Winnie99
Starting Member
1 Post |
Posted - 2012-02-09 : 18:02:55
|
| Hi everybody i have ONE table containing following data A B P1 S1 P1 S3 P2 S1 P2 S2I now want to select string1-data which dont contain 'S3'.The answer is obviously 'P2'. Can somewone out there help me??Thanks Jenny |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-09 : 18:06:38
|
| [code] SELECT A FROM table GROUP BY A HAVING SUM(CASE WHEN B='S3' THEN 1 ELSE 0 END) = 0 [/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|