title: Excluding data using NOT IN in the join using DB2, SQL PL
body: <p>I need assistance in formulating the correct approach to a query.   </p>
  
  <p>I have staff members that I need to give work to.  If they're not available on a date, they're excluded from the group of staff members that can get work.  I think it's clear what I'm trying to do, but it's incorrect syntax:</p>
  
  <pre><code>INNER JOIN mySchema."STAFF" S
  ON RS.STAFF_ID = S.STAFF_ID
  AND RS.STAFF_ID NOT IN (SELECT SU.STAFF_ID 
  FROM mySchema."STAFF_UNAVAIL" SU
  WHERE SU.UNAVAIL_DT = OUTSTANDING_DATE)
  </code></pre>
  
  <p>Any ideas on how one could achieve a NOT IN in a join without actually doing it in the join?  </p>