Hi,
sorry, das GROUP BY fehlt natürlich
SQL-Code:
SELECT a.ArtNr,a.ArtBez, a.Menge, SUM(b.GutStueck) AS MENGE
FROM OEE_StckList AS a
JOIN OEE_Produktion AS b on a.ArtNr = b.ArtNr
WHERE Year(b.Datum) = 2007
GROUP BY a.ArtNr, a.ArtBez, a.Menge
ORDER BY a.ArtNr