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 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... 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
Archived
This topic is now archived and is closed to further replies.