Can you please help me why my below SQL is not working in Access 2010?
SELECT Table2.Product, Table2.Color, SEQMAX, Table1.Attribute FROM ( Table2 LEFT JOIN ( SELECT Table1.Product, MAX (Table1.Seq) as SEQMAX FROM Table1 GROUP BY Table1.Product ) AS MAXTABLE ON Table2.Product = MAXTABLE.Product ) LEFT JOIN Table1 ON MAXTABLE.SEQMAX = Table1.Seq AND Table2.Product = Table1.Product ;
It is fine until I add the last line
AND Table2.Product = Table1.Product both pieces of the
AND worked fine separately, however I can't figure out why they don't work when combined.
I'm getting an error:
JOIN expression not supported.