i've been trying to get records that exist in table A but not in table B (as you can see in Result) with the following query but this shows an empty table
the query:
select * FROM TableA
where ref1 not in (select ref1 from TableB)
and ref2 not in (select ref2 from TableB)
and ref3 not in (select ref3 from TableB)
Table A:
ref1 ref2 ref3 qte
VT1 Jaune L 100
VT1 Jaune XL 100
VT1 GRIS L 100
VT1 GRIS XL 100
VT2 Jaune L 100
VT2 Jaune XL 100
VT2 GRIS L 100
VT2 GRIS XL 100
Table B:
ref1 ref2 ref3 qte
VT1 Jaune L 100
VT1 GRIS L 100
VT2 Jaune L 100
VT2 GRIS L 100
VT2 GRIS XL 100
Result:
ref1 ref2 ref3 qte
VT1 Jaune XL 100
VT2 Jaune XL 100