Einzelnen Beitrag anzeigen

omata

Registriert seit: 26. Aug 2004
Ort: Nebel auf Amrum
3.154 Beiträge
 
Delphi 7 Enterprise
 
#5

Re: ADO / DBGrid / Query / mehrere Tabellen

  Alt 6. Jul 2008, 21:20
SQL-Code:
SELECT *, iif(Leihe.Platte IS NULL,'Nein','Ja') AS Ausleihe
FROM ((((Platte AS t1
         INNER JOIN Interpret AS t2 ON t1.interpret = t2.id)
        INNER JOIN Label AS t3 ON t1.label = t3.id)
       INNER JOIN Stil AS t4 ON t1.stil = t4.id)
      INNER JOIN Qualität AS t5 ON t1.qualität = t5.id)
LEFT JOIN (SELECT DISTINCT Platte
           FROM Leihe) Leihe
  ON t1.id = Leihe.platte
  Mit Zitat antworten Zitat