i m using SQL 2008 R2
i got duplicate value from my join table:
SELECT *
FROM LETTRE_VOIT
LEFT JOIN FAWEB_CLIENT ON FAWEB_CLIENT.CODE_CLIENT = LETTRE_VOIT.CODE_CLIENT
LEFT JOIN ORDRE ON ORDRE.CODE_DEST = LETTRE_VOIT.CODE_DEST AND ORDRE.CODE_CLIENT = LETTRE_VOIT.CODE_CLIENT
AND ORDRE.DATE_CLOTUR = LETTRE_VOIT.DATE_CLOTURE
WHERE LETTRE_VOIT.NO_ORDRE IN ('5530','5533')
as you can see on image i got double value of 5530 and 5533.
my table FAWEB_CLIENT with ID Code_Client
table LETTRE_VOIT with ID NOID and NO_ORDRE
table ORDRE with ID NO_ORDRE and NO_CLIENT
i can not use DISTINCT: error message: The text data type can not be selected as DISTINCT because it is not comparable