I m sure that this statement works in Esper:
/* query from table TableA when receive event PriceEvent */
ON PriceEvent p
SELECT a.SymbolA, p.price
FROM TableA a
WHERE a.Symbol = p.Symbol
But this statement throws error:
/* 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
Error Message:
com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near ',' expecting end-of-input but found a comma ','
Then I use JOIN but it still doesn't work:
/* 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
Error Message:
Incorrect syntax near 'join' (a reserved keyword) expecting end-of-input but found 'join'
How to join two tables in Esper?