title: MySQL Select Statement not working
body: <p>I am trying to create a select statement to be used in a view. The goal is to create a view showing office description, party description, candidate name and incumbant indicator. I have the following table is my database:</p>
  
  <p><img src="https://i.stack.imgur.com/TfhE2.png" alt="database layout"></p>
  
  <pre><code>SELECT `OFFICE DESCRIPTION`,
         `PARTY DESCRIPTION`,
         `CANDIDATE NAME`,
         `INCUMBANT INDICATOR`   
  FROM   OFFICE,PARTY,CANDIDATE 
  WHERE  CANDIDATE.`OFFICE CODE`= OFFICE.`OFFICE CODE` 
         AND CANDIDATE.`CANDIDATE ID`=`PARTY CANDIDATE`.`CANDIDATE ID` 
         AND `PARTY CANDIDATE`.`PARTY CODE`=PARTY.`PARTY CODE`;
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>#1054 - Unknown column 'PARTY CANDIDATE.CANDIDATE ID' in 'where clause' 
  </code></pre>
  
  <p>I have verified all the columns do exist for this SQL statement to work but for some reason it keeps returning an error that PARTY CANDIDAT.CANDIDATE ID doesn't exist. Any help would be appreciated. Let me know if there is anything more you need me to uplaod including table definitions and layouts.</p>