This error message appears when you try to execute a SELECT DISTINCT Statement that should be sorted by a column, which does not appear in the SELECT list.
Error:
SELECT DISTINCT Data
FROM Compras
ORDER BY Valor ASC
Solution 1:
SELECT DISTINCT (Data), Valor
FROM Compras
ORDER BY Valor ASC
Solution 2:
SELECT DISTINCT (Data)
FROM Compras
ORDER BY Data ASC
Sem comentários:
Enviar um comentário