I have 2 tables
A
artnr grp name
1 FlowerA NameA
2 FlowerB NameB
3 FlowerC NameC
4 FlowerD NameD
B
artnr eigenschap waarde
1 color Red
2 color Null
4 color Yellow
4 Height 30
How do I get 4 results with color?
Select A.Artnr,
A.grp,
A.name,
B.waarde
from A
left join B on B.Artnr = A.Artnr
where B.Eigenschap = 'color'
My problem is that table B doesn't have artnr 3, Artnr 2 is empty( Is Null) that's no problem. I have problems when a record doesn't exist in both tables.
I would like the following result:
A left join b
artnr grp name waarde
1 FlowerA NameA red
2 FlowerB NameB NULL
3 FlowerC NameC NULL -- Droptopp: I want to see this even not in table B
4 FlowerD NameD yellow
I get 3 rows, missing row with artnr 3 it's because it's not in table B I think. So how do I get a result with 4 rows and the row with artnr 3 an empty cell in the column color?