Select Name, Vorname from komponist
Where exists (select * from Stueck where Komponist.knr=stueck.Knr and Stueck.opus is not NULL)
Union all select
Select Name, Vorname from komponist
Where not exists (select * from Stueck where Komponist.knr=stueck.Knr and Stueck.opus is not NULL)
Oder by 1,2
das rote Select ist zuviel oder? Hab es weggenommen und er gibt alle Komponisten aus. Nur das mit dem Y und N ist mir total neu.
Where exists (select * from Stueck where Komponist.knr=stueck.Knr and Stueck.opus is not NULL)
Union all select
Select Name, Vorname from komponist
Where not exists (select * from Stueck where Komponist.knr=stueck.Knr and Stueck.opus is not NULL)
Oder by 1,2
das rote Select ist zuviel oder? Hab es weggenommen und er gibt alle Komponisten aus. Nur das mit dem Y und N ist mir total neu.
Comment