I have the following select statement. What I am basically trying to do is select all rows where the manager and year are equal to what is shown in the sql below and the columns fcst_jan through fcst_dec does not contain one of those values. It seems to work find for some, but I am still getting rows that contain 205 in one of the columns. So basically i want to select rows where any column jan through dec doesnt contain one of those values. Please help. I can't figure it out. I know my table design isnt the best way of doing it, but it is what I have, so i need to figure it out.
SELECT fcst_id, fcst_emplname, fcst_emplid, fcst_posid, fcst_mgrid, fcst_sect_id, fcst_year, fcst_jan, fcst_feb, fcst_mar, fcst_apr, fcst_may, fcst_jun, fcst_jul, fcst_aug, fcst_sep, fcst_oct, fcst_nov, fcst_dec, fcst_comments FROM EMS.dbo.TEMSFCST WHERE (fcst_mgrid = '00809571') AND (fcst_year = 2016) AND (fcst_jan NOT IN (1, 2, 3, 4, 5, 205, 211)) OR (fcst_mgrid = '00809571') AND (fcst_year = 2016) AND (fcst_feb NOT IN (1, 2, 3, 4, 5, 205, 211)) OR (fcst_mgrid = '00809571') AND (fcst_year = 2016) AND (fcst_mar NOT IN (1, 2, 3, 4, 5, 205, 211)) OR (fcst_mgrid = '00809571') AND (fcst_year = 2016) AND (fcst_apr NOT IN (1, 2, 3, 4, 5, 205, 211)) OR (fcst_mgrid = '00809571') AND (fcst_year = 2016) AND (fcst_may NOT IN (1, 2, 3, 4, 5, 205, 211)) OR (fcst_mgrid = '00809571') AND (fcst_year = 2016) AND (fcst_jun NOT IN (1, 2, 3, 4, 5, 205, 211)) OR (fcst_mgrid = '00809571') AND (fcst_year = 2016) AND (fcst_jul NOT IN (1, 2, 3, 4, 5, 205, 211)) OR (fcst_mgrid = '00809571') AND (fcst_year = 2016) AND (fcst_aug NOT IN (1, 2, 3, 4, 5, 205, 211)) OR (fcst_mgrid = '00809571') AND (fcst_year = 2016) AND (fcst_sep NOT IN (1, 2, 3, 4, 5, 205, 211)) OR (fcst_mgrid = '00809571') AND (fcst_year = 2016) AND (fcst_oct NOT IN (1, 2, 3, 4, 5, 205, 211)) OR (fcst_mgrid = '00809571') AND (fcst_year = 2016) AND (fcst_nov NOT IN (1, 2, 3, 4, 5, 205, 211)) OR (fcst_mgrid = '00809571') AND (fcst_year = 2016) AND (fcst_dec NOT IN (1, 2, 3, 4, 5, 205, 211))