rahjiggah Posted November 5, 2013 Share Posted November 5, 2013 Hello my query is not excluding the exclusion (sectorid != 33) in my sql query, any chance someone can see where Ive gone wrong? ty kindly SELECT sectorid, coname, coticker, analystid, cocurr, corating, cotarg FROM newone WHERE (analystid = 12 AND active = 1) OR (analystid = 17 AND active = 1) OR (analystid = 24 AND active = 1 AND sectorid != 33) ORDER BY analystid, coname Quote Link to comment https://forums.phpfreaks.com/topic/283624-query-help-multiple-and-or/ Share on other sites More sharing options...
rahjiggah Posted November 5, 2013 Author Share Posted November 5, 2013 Its ok, The query is fine, exclusion was for wrong analystid, Sorry, please remove... Quote Link to comment https://forums.phpfreaks.com/topic/283624-query-help-multiple-and-or/#findComment-1457093 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.