0
Hello, friends. I am trying to perform a query on SQL SERVER that worked perfectly on Sqlite. Does anyone know how to make it work?
Consultation:
SELECT B.CLIENTE, A.CODCLI, SUM(A.VALOR-A.VALORPAGO) AS 'A RECEBER'
FROM ARGCONTASRECEBER A
INNER JOIN ARGCLIENTE B
ON A.CODCLI = B.CODCLI
WHERE A.VALORPAGO < A.VALOR
GROUP BY A.CODCLI
Error:
Message 8120, Level 16, Status 1, Line 1 The column 'ARGCLIENTE.CLIENT' is invalid in the selection list because it is not contained in either an aggregation function or the GROUP BY clause.
Grateful from now on!