Autor Beitrag
motion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 295

XP, Linux
D7 Prof
BeitragVerfasst: Fr 04.11.05 21:52 
Ich möchte für FB 1.5.2 folgenden Select, welche bisher einen Join mit EINER Tabelle macht, auf den Join mit ZWEI Tabellen erweitern.
Ich kriege aber die genaue Syntax nicht auf die Reihe.
ausblenden SQL-Anweisung
1:
2:
3:
4:
5:
6:
7:
select 
    aaw_lines.*, 
    aaw_l_preiszeile.* 
from aaw_lines left outer join aaw_l_preiszeile 
  on aaw_lines.ref=aaw_l_preiszeile.ref0 
where aaw_lines.ref0=105321 
order by aaw_lines.zeilennr


Dort soll jetzt hinzugefügt werden:

aaw_l_lagerteil.* aus Tabelle aaw_l_lagerteil
on aaw_lines.ref=aaw_l_lagerteil.ref0

Aber wie wird das gescheit zusammengesetzt?

Vielen Dank für die Hilfe
motion Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 295

XP, Linux
D7 Prof
BeitragVerfasst: Fr 04.11.05 22:13 
Hab's schon rausbekommen (durch einen Tip aus einem anderen Forum)

Lösung:
ausblenden SQL-Anweisung
1:
2:
3:
4:
5:
6:
7:
8:
9:
select
    aaw_lines.*,
    aaw_l_preiszeile.*,
    aaw_l_lagerteil.*
from aaw_lines left outer join aaw_l_preiszeile
  on aaw_lines.ref=aaw_l_preiszeile.ref0
left outer join aaw_l_lagerteil on aaw_lines.ref=aaw_l_lagerteil.ref0

order by aaw_lines.zeilennr


Moderiert von user profile iconraziel: Sql-Tags hinzugefügt.