title: How can I correct the correlation names on this sql join?
body: <p>I need a join that yields three fields with the same name from two different tables. When I try to run my sql query, VS gives me the following error.</p>
  
  <blockquote>
    <p>The objects "PoliticalFigures" and "PoliticalFigures" in the FROM clause have the same exposed names. Use correlation names to distinguish them.</p>
  </blockquote>
  
  <p>I've been trying to use "AS" to distinguish these fields, but I haven't found a working solution. This is the sql query I'm running:</p>
  
  <pre><code>SELECT Countries.Name AS Country, PoliticalFigures.Name AS President, PoliticalFigures.Name AS VicePresident FROM Countries
  LEFT OUTER JOIN PoliticalFigures ON Countries.President_Id = PoliticalFigures.Id
  LEFT OUTER JOIN PoliticalFigures ON Countries.VicePresident_Id = PoliticalFigures.Id
  </code></pre>
  
  <p>If it's not obvious from the code, these are the tables.</p>
  
  <ul>
  <li>Countries: Id, Name, President_Id, VicePresident_Id.</li>
  <li>PoliticalFigures: Id, Name.</li>
  <li>Joined table: Country, President, VicePresident</li>
  </ul>
  
  <p>(Note, the tables and fields in my application have different names. I am generalizing them to make this example clearer and <em>hopefully</em> more relevant to others.)</p>
  
  <p>(The tools I'm using are Visual Web Developer 2010 Express and SQL Server 2008 Express.)</p>