Bom Dia !
Estou com um problema com o meu select. Mesmo usando o comando
DISTINCT em um unico campo ele continua vindo repetido:
SELECT DISTINCT(P.PesFax), P.PesNomLon,
C.CarDes, E.PesNomLon as Empresa
FROM Pessoa AS P LEFT JOIN Cargo AS C
ON P.CarCod = C.CarCod LEFT JOIN Pessoa AS E
ON P.PesFunEmp = E.PesCod LEFT JOIN Planejamento_Pessoa as PP
ON P.PesCod = PP.PesCod
WHERE PP.PlaCod = '4258' and (P.PesTip = 'F' or P.PesTip = 'P') and
P.PesFax <> ''
and PP.PlaPesFax = 0 and (LEN(P.PesFax) = 9 or LEN
(P.PesFax) = 10)
Será q alguém poderia me ajudar ????