I'm having trouble executing a SQL query.
The query is:
SELECT DISTINCT CHAVE_FATO,COD_FILIAL,COD_DOCTO,NUM_DOCTO,DATA,VALOR_TOTAL,VALOR_LIQUIDO,COD_CLI_FOR,NOME_CLI_FOR,COD_VEND_COMP,NOME_VEND_COMP,COD_PRODUTO,DESC_PRODUTO_EST,NOME_SECAO,QTDE_UND,QTDE_PRI,QTDE_AUX,VALOR_UNITARIO,VALOR_TOTAL_ITEM
FROM [SATK].[dbo].entrada
WHERE DATA > '2018-01-01 00:00:00'
ORDER BY NUM_DOCTO ASC
Does not work, return continues showing repeated values in column NUM_DOCTO.
I need to eliminate this, but I can not.