title: SQL Logical Operators -- Trying to get correct results
body: <p>I am wondering what I am doing wrong with these operators.</p>
  
  <p>I'm ultimately trying to get a list of people where one of the p.TEST OR p.DL is missing, but not both of them on the same person.</p>
  
  <pre><code> select ....
    from ....
  
      WHERE
  
   ((p.TEST is null OR p.DL is null) OR
   (p.TEST = 0 or p.DL = 0) OR
   (p.TEST = 1 or p.DL = 0) OR
   (p.TEST = 0 or p.DL = 1))
  </code></pre>