title: SQL query to show only duplicate entry based of a column value, result should bring in all column values
body: <p>Need some help please with my SQL Server query.</p>
  
  <p>I have a SQL Server table and I wanted to get all column data if <code>Employee_Number</code> column has more than one record; if it has only unique value then I don't want to get it displayed. </p>
  
  <p>From below example, <code>Employee_Number</code> column has duplicates values of <code>1111111</code> and <code>3333333</code>. So it displayed all the records of duplicate values including all the rest of column values.</p>
  
  <p>The data pasted below looks like scattered, so I have shown as an image too (my data and expected output)</p>
  
  <p>Actual data in SQL Server:</p>
  
  <pre><code>userid  Gecos   B2A_LDAP    AD  Employee_Number B2A_CN  absJobAction    Generic_OR_User Unix_ID Additional_ID_in_Unix   Application_Access
  user1   user one    user1   user1   1111111 user one    HIRED   User    user1   NULL    NULL
  user2   user two    user2   user2   2222222 user two    HIRED   User    user2   NULL    NULL
  user11  user one additional user1   user1   1111111 user one    HIRED   User    user11  NULL    NULL
  user3   user three  user3   user3   3333333 user three  HIRED   User    user3   NULL    NULL
  user33  user three spare ID 1   user3   user3   3333333 user three  HIRED   User    user33  NULL    NULL
  user4   user four   user4   user4   4444444 user four   HIRED   User    user4   NULL    NULL
  user333 user three spare ID 3   user3   user3   3333333 user three  HIRED   User    user333 NULL    NULL
  </code></pre>
  
  <p>My expected output should be as below.</p>
  
  <pre><code>userid  Gecos   B2A_LDAP    AD  Employee_Number B2A_CN  absJobAction    Generic_OR_User Unix_ID Additional_ID_in_Unix   Application_Access
  user1   user one    user1   user1   1111111 user one    HIRED   User    user1   NULL    NULL
  user11  user one additional user1   user1   1111111 user one    HIRED   User    user11  NULL    NULL
  user3   user three  user3   user3   3333333 user three  HIRED   User    user3   NULL    NULL
  user33  user three spare ID 1   user3   user3   3333333 user three  HIRED   User    user33  NULL    NULL
  user333 user three spare ID 3   user3   user3   3333333 user three  HIRED   User    user333 NULL    NULL
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Kg8Zn.png" rel="nofollow noreferrer">Data in SQL Server table</a></p>
  
  <p><a href="https://i.stack.imgur.com/dniLY.png" rel="nofollow noreferrer">My expected output</a></p>