have a table where i run two commands with this:
SELECT DISTINCT(DésignationBDC2) FROM pdc where BDC3 like '%01|06|02%'
SELECT DISTINCT(DésignationBDC2) FROM pdc where Id=60
then i get this:
DésignationBDC2
018 Rose
047 Noir
507 Poudre
545 Rouge
556 Navy
F72 Caramel
280 Saphir
and this
DésignationBDC2
047 Noir
545 Rouge
556 Navy
F72 Caramel
i’d like to substract these tables to get this:
DésignationBDC2
null
047 Noir
null
545 Rouge
556 Navy
F72 Caramel
null
how can i do ?
thanks
3
Answers
using the method you proposed, i tried to join those two tables like this:
these tables are : 1 and 2
however, i get this :3 and as you can see, the order of "DésignationBDC2" is lost from the first table. How can i avoid this ?
You can achieve it using the left join
I recommend aggregation: