Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
Delphi 10.2 Tokyo Professional
|
AW: JOINs
25. Aug 2014, 15:11
Hallo,
Das sollte eigentlich mit Left-Joins gehen:
Code:
SELECT
coalesce(tab1.menge, 0) + coalesce(tab2.menge,0) + coalesce(tab3.menge, 0) as menge_summe
FROM tab1
LEFT JOIN tab2 on tab2.artikelnr = tab1.artikelnr
LEFT JOIN tab3 on tab3.artikelnr = tab1.artikelnr
WHERE ...
Michael "Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
|
|
Zitat
|