Hi,

I'm using Visual Studio 2010 and I'm trying to make a query that return tha maximum value of CodDekafix from the table Indice and get other values from others 3 tables with the same value CodDekafix. The code is below:


sql = "SELECT * FROM Indice " _
& " WHERE CodDekafix=(Select max(CodDekafix) From Indice) " _
& "INNER JOIN (((dekafix1 INNER JOIN dekafix2 ON dekafix1.CodDekafix = dekafix2.CodDekafix) " _
& "INNER JOIN dekafix3 ON dekafix2.CodDekafix = dekafix3.CodDekafix) " _
& "INNER JOIN dekafix1_2L ON dekafix3.CodDekafix = dekafix1_2L.CodDekafix) " _
& "ON Indice.CodDekafix = dekafix1.CodDekafix ORDER BY Indice.CodDekafix"

But the result is an error: Syntax error (missing operator) in query expression

Any suggestion?

Thank you a lot,

Edson