title: How do I remove "duplicate" rows from a view?
body: <p>I have a view which was working fine when I was joining my main table:  </p>
  
  <pre><code>LEFT OUTER JOIN OFFICE ON CLIENT.CASE_OFFICE = OFFICE.TABLE_CODE.
  </code></pre>
  
  <p>However I needed to add the following join:</p>
  
  <pre><code>LEFT OUTER JOIN OFFICE_MIS ON CLIENT.REFERRAL_OFFICE = OFFICE_MIS.TABLE_CODE 
  </code></pre>
  
  <p>Although I added <code>DISTINCT</code>, I still get a "duplicate" row. I say "duplicate" because the second row has a different value.</p>
  
  <p>However, if I change the <code>LEFT OUTER</code> to an <code>INNER JOIN</code>, I lose all the rows for the clients who have these "duplicate" rows.</p>
  
  <p>What am I doing wrong? How can I remove these "duplicate" rows from my view?</p>
  
  <hr>
  
  <h3>Note:</h3>
  
  <p>This question is not applicable in this instance:</p>
  
  <blockquote>
    <p><a href="https://stackoverflow.com/questions/18932/sql-how-can-i-remove-duplicate-rows">How can I remove duplicate rows?</a> </p>
  </blockquote>