title: BigQuery: inner join Field not found in table
body: <p>This is pretty basic so I do not know why it does not work.</p>
  
  <p>I am trying to get rows from a table with udids that are in another table.</p>
  
  <p>Query:</p>
  
  <pre><code>SELECT aliasA.udid, aliasA.score 
  FROM (TABLE_QUERY(TableA,'REGEXP_MATCH(table_id, "Scores_2014_04_01_5")')) as aliasA
  INNER JOIN ProjectB.udids as aliasB
  ON aliasA.udid = aliasB.udid
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Field 'aliasA.udid' not found in table 'TableA.Scores_2014_04_01_5'.
  </code></pre>
  
  <p>but there are fields "udid" in both tables</p>
  
  <p>Please help me, this should be so simple I am going crazy!</p>
  
  <p>It seems that the problem is with <code>(TABLE_QUERY(TableA,'REGEXP_MATCH(table_id, "Scores_2014_04_01_5")')) as aliasA</code>, since if I use <code>TableA.Scores_2014_04_01_5</code> it works.</p>
  
  <p>However, it is crucial for me to use the TABLE_QUERY!</p>