Jump to content

Query help (multiple AND OR)


rahjiggah

Recommended Posts

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

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.