title: How to overcome the error on join union tables with other table
body: <p>While we try to join between union tables on one side with other table on the other side,</p>
  
  <pre><code>SELECT A.x,B.y FROM ([DataSet.Liad],[DataSet.Livne]) AS A INNER JOIN [DataSet.Names] AS B ON A.ID = B.ID LIMIT 10
  </code></pre>
  
  <p>we get this error:</p>
  
  <blockquote>
    <p>Error: 2.1 - 0.0: JOIN cannot be applied directly to a table union or to a table wildcard function. Consider wrapping the table union or table wildcard function in a subquery (e.g., SELECT *).</p>
  </blockquote>
  
  <p>In order to solve this error I suggest you to use a View.
  Save this Query of union as a View, DataSet.LiadLivne:</p>
  
  <pre><code>SELECT * FROM [DataSet.Liad],[DataSet.Livne] 
  </code></pre>
  
  <p>Execute the origin query using the view:</p>
  
  <pre><code>SELECT A.x,B.y FROM [DataSet.LiadLivne] AS A INNER JOIN [DataSet.Names] AS B ON A.ID = B.ID LIMIT 10
  </code></pre>
  
  <p>Enjoy</p>