i have a problem which needs to get resolved and i hope some of you can help.
i have an article table (Table A)
Article Description
A43234 desk
A42323 paper
A43235 chair
and a attribute table (Table B)
Attribute Article Value
height A42323 120cm
width A42324 200cm
material A42323 wood
price A43235 chair
not every article has an attribute in table B.
But if there is a material attribute entry for an article of Table A then it should be in the result. If there is no material attribute entry then it should be an empty string.
The result should be:
Article Attribute Value
A42323 paper wood
A42324 desk ""
A42325 chair ""
My idea:
SELECT a.Article, a.Description, a.DLV, b.Value
from tableA a
join tableB b
on a.Article = b.Article
and b.Attribute = 'material'
Thanks!
Asked by Andre
(3 rep)
Jul 15, 2021, 10:25 PM
Last activity: Jul 16, 2021, 03:38 PM
Last activity: Jul 16, 2021, 03:38 PM