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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-04-01 : 08:05:44
|
| writes "This will include hometowns of players playing for the Dodgers or Giants.How do I exclude those playing from the Yankees?EX: If hometowns for A&B are x,y,z But hometowns for C are x,y Then only Z should display.SELECT DISTINCT P.plyrHomeTownFROM playerTable AS P, TeamTable AS TWHERE T.TeamName in ('Dodgers','Giants') AND P.teamId = T.teamId;" |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2005-04-01 : 08:07:30
|
| Use AND blah NOT IN ?-------Moo. :) |
 |
|
|
|
|
|