Jump to content

Multiple ANDs and an OR in a WHERE clause...


Jim R

Recommended Posts

SELECT paid,nameFirst,nameLast,college,feet,inches,phoneMobile,email 
FROM college_league_2018 
WHERE confirm ='1' 
AND  teamplayer='player' 
AND (college != 'Wabash' OR college != 'DePauw') 
ORDER BY college, nameLast

 

This seems simple, and I've found a few examples saying to use parentheses.  It's not working.  

I want individuals where...

confirm = 1

teamplayer = player

who don't attend Wabash or DePauw

 

My results still include individuals who attend both schools.  When I remove the OR and just exclude one of the schools, it works.  

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.