title: Esper How To Join Tables
body: <p>I m sure that this statement works in Esper:</p>
  
  <pre><code>/* query from table TableA when receive event PriceEvent */
  ON PriceEvent p
  SELECT a.SymbolA, p.price
  FROM TableA a
  WHERE a.Symbol = p.Symbol
  </code></pre>
  
  <p>But this statement throws error:</p>
  
  <pre><code>/* join table TableA with TableB */
  ON PriceEvent p
  SELECT a.SymbolA, p.price, b.SymbolB
  FROM TableA a, TableB b
  WHERE a.Key = b.Key and a.Symbol = p.Symbol
  </code></pre>
  
  <p>Error Message:</p>
  
  <pre><code>com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near ',' expecting end-of-input but found a comma ','
  </code></pre>
  
  <p>Then I use JOIN but it still doesn't work:</p>
  
  <pre><code>/* join table TableA with TableB */
  ON PriceEvent p
  SELECT a.SymbolA, p.price, b.SymbolB
  FROM TableA a inner join TableB b
  ON a.Key = b.Key
  WHERE a.Symbol = p.Symbol
  </code></pre>
  
  <p>Error Message:</p>
  
  <pre><code>Incorrect syntax near 'join' (a reserved keyword) expecting end-of-input but found 'join'
  </code></pre>
  
  <p>How to join two tables in Esper?</p>