Hallo,
ich habe die Tabelle a mit:
a.id
a.kundenummer
a.wert
ich habe dann noch 2 weitere Tabellen b,c:
b.kundennummer
b.email
c.kundennummer
c.email
Nun soll pro a.wert jeweils folgendes ausgegeben werden:
kundenummer, email, wert
Beispiel
a:
1,DEB1,5
b.DEB1,[email protected]
b.DEB1,[email protected]
c.DEB1,[email protected]
c.DEB1,[email protected]
c.DEB1,[email protected]
c.DEB1,[email protected]
Ergebnis:
DEB1, [email protected], 5
DEB1, [email protected], 5
DEB1, [email protected], 5
DEB1, [email protected], 5
DEB1, [email protected], 5
DEB1, [email protected], 5
Aber wie kann ich pro Eintrag in der Tabelle a, alle Email Adressen von Tabelle b und c ausgeben?
Danke!
ich habe die Tabelle a mit:
a.id
a.kundenummer
a.wert
ich habe dann noch 2 weitere Tabellen b,c:
b.kundennummer
b.email
c.kundennummer
c.email
Nun soll pro a.wert jeweils folgendes ausgegeben werden:
kundenummer, email, wert
Beispiel
a:
1,DEB1,5
b.DEB1,[email protected]
b.DEB1,[email protected]
c.DEB1,[email protected]
c.DEB1,[email protected]
c.DEB1,[email protected]
c.DEB1,[email protected]
Ergebnis:
DEB1, [email protected], 5
DEB1, [email protected], 5
DEB1, [email protected], 5
DEB1, [email protected], 5
DEB1, [email protected], 5
DEB1, [email protected], 5
Code:
select a.wert, b.mail from TabelleA as a INNER JOIN TabelleB as b ON b.Kundennummer = a.Kundennummer
Danke!
Comment