What do I need to do to convert this query to work within in SQL Server?
SELECT
DISTINCT(map_objetivos.OBJ_RowID) AS test,
map_objetivos.OBJ_Objetivo
FROM
map_admin_caminho_critico_indicadores
INNER JOIN
map_admin_caminho_critico ON CCR_RowID = CCI_CaminhoDR
INNER JOIN
map_indicadores ON IND_RowID = CCI_IndicadorDR
INNER JOIN
map_objetivos ON OBJ_RowID = IND_ObjetivoDR
GROUP BY
map_objetivos.OBJ_RowID
SQL Server, unlike MySQL, won’t allow unaggregated or grouped fields in the select list. Also, your
DISTINCTis redundant. Try this: