title: SQL 2005 - The column was specified multiple times
body: <p>I am getting the following error when trying to run this query in SQL 2005:</p>
  <pre><code>    SELECT tb.*
      FROM (
          SELECT *
          FROM vCodesWithPEs INNER JOIN vDeriveAvailabilityFromPE
          ON vCodesWithPEs.PROD_PERM = vDeriveAvailabilityFromPE.PEID
          INNER JOIN PE_PDP ON vCodesWithPEs.PROD_PERM = PE_PDP.PEID
      ) AS tb;
  
  Error: The column 'PEID' was specified multiple times for 'tb'.
  </code></pre>
  <p>I am new to SQL.</p>