MySQL Forums
Forum List  »  German

Re: Mehrere Zeilen in einer Zeile ausgeben
Posted by: Robert Meyer
Date: January 04, 2019 05:07AM

Soweit mal die Lösung selber gefunden...


select e1.evname, e1.evdatvon, e1.evdatbis, mg1.status, group_concat(distinct mi1.vname separator ', '), mg2.status, group_concat(distinct mi2.vname separator ', '), mg3.status, group_concat(distinct mi3.vname separator ', ') from event as e1, mgevent as mg1, mgevent as mg2, mgevent as mg3, mitglied as mi1, mitglied as mi2, mitglied as mi3 where e1.evid = mg1.evid and mg1.status = 0 and mg2.status = 1 and mg3.status = 2 and mg2.evid = mg1.evid and mg3.evid = mg1.evid and mg1.mgnr = mi1.mgnr and mg2.mgnr = mi2.mgnr and mg3.mgnr = mi3.mgnr group by mg1.evid, mg1.status;

ABER

Wenn jetzt ein Event KEINE Teilnehmer mit einem Status "0" hat werden mir auch die anderen Stati nicht angezeigt....

Vielleicht hat jemand dafür noch ne Lösung

LG
Robert

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Mehrere Zeilen in einer Zeile ausgeben
552
January 04, 2019 05:07AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.