title: MSSQL - LEFT join with nulls in RIGHT table
body: <p>I have two tables, tblClient and tblBill which are joined on cltID.  Some cltID in tblClient don't have records in tblBill.  I want to return all records from tblClient and join tblBill records which are within a date range.  If they don't have tblBill records I still want to return that tblClient record.</p>
  
  <p>I'm running:</p>
  
  <pre><code>select *
  from tblClient left outer join tblBill
  on tblClient.cltID = tblBill.cltid
  where tblbill.billDtm between @dtStart and @dtEnd
  or tblbill.billDtm is null
  </code></pre>
  
  <p>If I take out the WHERE clause it returns everything.  If I add it back it only returns the records which have a record in tblBill.</p>
  
  <p>This is killing me and I'm sure I'm missing something stupid...  Hoping someone can help?</p>