title: Using != gets me different results when using NOT IN in SQL
body: <p>When I use the != operator in a SQL query multiple times in the WHERE statement of a query, it doesn't appear to work, however when I use NOT IN operator it does work. Me and my colleague looked at it and we can't figure out why.  </p>
  
  <p>This is a query that will select records from a table that does not contain certain values, hence why I was using NOT IN and !=.</p>
  
  <pre><code>-- With NOT IN (this works).
  
  SELECT SUM(ACTUAL_COST_FW) 
  FROM COSTINGS_FW
  WHERE COSTINGS_FW.VEHICLE_ID_FW = '1234' AND
  COSTING_CODE_FW NOT IN ('TYRES-P', 'TYRES-L', 'TYRES-E-P', 'TYRES-E-L', 
  'ROADTAX', 'MISC', 'LEASE', 'INSURANCE', 'FUEL', 'DP', 'ACCIDENT')
  
  -- Without NOT IN (this doesn't work).
  
  SELECT SUM(ACTUAL_COST_FW) 
  FROM COSTINGS_FW
  WHERE COSTINGS_FW.VEHICLE_ID_FW = '1234' AND
  (COSTING_CODE_FW != 'TYRES-P' OR 
  COSTING_CODE_FW != 'TYRES-L' OR 
  COSTING_CODE_FW != 'TYRES-E-P' OR 
  COSTING_CODE_FW != 'TYRES-E-L' OR 
  COSTING_CODE_FW != 'ROADTAX' OR 
  COSTING_CODE_FW != 'MISC' OR 
  COSTING_CODE_FW != 'LEASE' OR 
  COSTING_CODE_FW != 'INSURANCE' OR 
  COSTING_CODE_FW != 'FUEL' OR 
  COSTING_CODE_FW != 'DP' OR 
  COSTING_CODE_FW != 'ACCIDENT')
  </code></pre>
  
  <p>With the multiple != operators with 'OR' keyword it will return a record  (that contains '1234' within the 'VEHICLE_ID_FW' field) that I know also contains 'TYRES-L' within the field 'COSTING_CODE_FW' however when I use the 'NOT IN' operator it doesn't return that record as it should. Any ides why?</p>