Hello,
FROM getpartner(4) p,
getVertragskonten(4) vk,
getVertraege(4) v,
getAnlagen(4) aLEFT JOIN getAdressen(4) aadr ON (adressen_id = aadr.id)
LEFT JOIN getAdressen(4) padr ON (id = padr.geschaeftspartner_id)
OK, mir stellen sich gerade die Nackenhaare hoch...
- warum mischst du implizite und explizite JOIN Syntax - ich finde es ja schonmal nett vom DBMS, dass das keinen Syntaxfehler gibt. Nur in Punkto Vorhersagbarkeit der Ergebnisse finde ich es - gelinde gesagt - unglücklich
- was ist getVertragskonden(4) etc., sind das Tabellennamen??
- adressen_id kann offenbar keiner/nicht eindeutig einer der beteiligten Tabellen zugeordnet werden - verwende einen Qualifier, so wie du es bei aadr.id auch getan hast.
MfG
Rouven
--
-------------------
Computer programming is tremendous fun. Like music, it is a skill that derives from an unknown blend of innate talent and constant practice. Like drawing, it can be shaped to a variety of ends: commercial, artistic, and pure entertainment. Programmers have a well-deserved reputation for working long hours but are rarely credited with being driven by creative fevers. 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. -- Larry OBrien and Bruce Eckel in Thinking in C#
-------------------
Computer programming is tremendous fun. Like music, it is a skill that derives from an unknown blend of innate talent and constant practice. Like drawing, it can be shaped to a variety of ends: commercial, artistic, and pure entertainment. Programmers have a well-deserved reputation for working long hours but are rarely credited with being driven by creative fevers. 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. -- Larry OBrien and Bruce Eckel in Thinking in C#