title: SQL - Select all rows from one table that have a similar value with a different prefix
body: <p>I have a table with around 1million rows.
  In the fileID column there has been some accidental duplication.
  This column can have 7 or 8 digit numbers stored as a string.</p>
  
  <p>I need to search for all 7-digit values that have a corresponding entry that is the same seven digits with a '0' (zero) prefixing it.</p>
  
  <p>So, while there should only be a row with value '1234567' in fileID, there is now a new row with '01234567' that has been entered in error. I believe around 10,000 rows have been affected, and the incorrect entries need to be removed.</p>
  
  <p>How would I write a SQL query to select only rows that have a corresponding 0-prefixed row, and return both rows in the results?</p>
  
  <p>CLARIFICATION EDIT:
  Some valid data has already been entered into the records with incorrect fileID, so the output I need would ideally have a row with a 7-digit fileID followed by any corresponding rows that have an eight digit fileID with leading '0'.</p>
  
  <p>fileID   other1 other2<br>
  1234567  xxxxxx xxxxxxx<br>
  01234567 xxxxxx xxxxxxx<br>
  1234566  xxxxxx xxxxxxx<br>
  01234566 xxxxxx xxxxxxx</p>