Question : ODBC  - Call Failed  Microsoft ODBC Driver  Incorrect Syntax Near the keyword WHERE (#156)

I get this error when trying to run this query.

**************Begin Code ***********
SELECT DISTINCTROW [Promedio BaseQRY].PARTE, Avg([Promedio BaseQRY].CFU) AS AvgOfCFU
FROM [Promedio BaseQRY]
GROUP BY [Promedio BaseQRY].PARTE
HAVING ((([Promedio BaseQRY].PARTE) In (SELECT [PARTE] FROM [Promedio BaseQRY] As Tmp GROUP BY [PARTE] HAVING Count(*)>=1 )))
ORDER BY [Promedio BaseQRY].PARTE;
******* End Code ********

this query came from an Access 97 project to access 2000
It was all in one access 97 DB, now the DB is in a Sql Server (2000) and the F/E is in access 2000.

Answer : ODBC  - Call Failed  Microsoft ODBC Driver  Incorrect Syntax Near the keyword WHERE (#156)

I'm pretty sure DISTINCTROW is not valid for SQL server but DISTINCT is.  I had to change all my DISTINCTROW queries to DISTINCT when I did an upgrade from Access to SQL.  May that's causing a weird error?
Random Solutions  
 
programming4us programming4us