I'm trying to have a clausule where what compare a column from table A with a column from table B but the result dont bring nothing. Am I doing something wrong?
My query>
SELECT EMP, COD, VEV, SEQ, TIP, NUM, EMI, VEN, DTR, GRU, PRO, QTD, PVE, TOT, FAT, COM, COO, REF, VAR, hcli.NOM as "VENDEDOR", hemp.enc
FROM hcov
INNER JOIN hcli ON hcov.COD = hcli.COD
INNER JOIN hemp ON hemp.cod = hcov.emp
WHERE (hcli.NOM NOT LIKE '%COOPERATIVA%')
AND (DTR >= date '2020-01-01')
AND (COD <> 24545 OR COD <> 10368 OR COD <> 13149 OR COD <> 10448 OR COD <> 11041 OR COD <> 30610 OR COD <> 6834)
AND (GRU <> 266 OR GRU <> 269 OR GRU <> 272)
AND ( (VEV <> 37125) AND (COO <> 987209 OR COO <> 23631 OR COO <> 927500 OR COO <> 22763 OR COO <> 38736 ) )
AND (hemp.enc <> hcov.cod)
AND (hemp.enc <> hcov.cod) -> aparently this line is not working as should
The result is totally blank but both column is different.. so it should bring