title: Access SQL, select multiple rows duplicates
body: <p>I need to select all my duplicates in a table, however the duplication must be spread through two rows. I tried some stuff which lead me to this code:</p>
  
  <pre><code>SELECT builder_2, sequence, clientname_2, clientPcode_2, status
    FROM tblClient
   WHERE clientname_2 IN (SELECT clientname_2
                            FROM tblClient
                           GROUP BY clientPcode_2, clientname_2
                          HAVING (COUNT(clientPcode_2) &gt; 1) AND (COUNT(clientname_2) &gt; 1)
                          )
     AND clientPcode_2 IN (SELECT clientPcode_2
                             FROM tblClient
                            GROUP BY clientPcode_2, clientname_2
                           HAVING (COUNT(clientPcode_2) &gt; 1) AND (COUNT(clientname_2) &gt; 1)
                          )
   ORDER BY clientPcode_2, clientname_2
  </code></pre>
  
  <p>However, this code is not working for obvious reasons, it selects any duplicates in both fields, so if a client name appear on two lines, he is considered "duplicate" even if the postal code doesn't match.</p>
  
  <p>I tried to do a single sub-select where I would add the primary keys (Number and Sequence), however the result was not what I wanted, seemed to be because of the group by. I can't explain it, but my test data were missing from the sample so I rejected the solution.</p>