SQL Abfrage: keine Duplikate - wie funktioniert das?

tester78

Admiral Special
Mitglied seit
05.08.2008
Beiträge
1.234
Renomée
4
Hallo

ich habe diese SQL Abfrage.
SMS_G_System_SERVICE.DisplayName
Ich bekomme viele Ergebnisse mit gleichem "DisplayName" zurück.
Wie müsste ich die Abfrage ändern sodass nur unterschiedliche DisplayNames zurückgeliefert werden?

Danke für jeden hinweis

Code:
select distinct SMS_R_System.Name, [B]SMS_G_System_SERVICE.DisplayName[/B], SMS_G_System_SERVICE.Status, SMS_GEH_System_SERVICE.StartMode from  SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceID = SMS_R_System.ResourceId inner join SMS_GEH_System_SERVICE on SMS_GEH_System_SERVICE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SERVICE.DisplayName != "Ablagemappe" and SMS_G_System_SERVICE.DisplayName != "Anmeldedienst" and SMS_G_System_SERVICE.DisplayName != "Hilfe und Support" and SMS_GEH_System_SERVICE.DisplayName != "Aufgabenplanung" and SMS_G_System_SERVICE.DisplayName != "Adaptive Helligkeit" and SMS_G_System_SERVICE.DisplayName != "Automatische Updates" and SMS_G_System_SERVICE.DisplayName != "Sicherheitscenter" and SMS_G_System_SERVICE.DisplayName != "Server" and SMS_G_System_SERVICE.DisplayName != "Plug & Play" order by SMS_G_System_SERVICE.DisplayName
 
Was für ein SQL-Server ist das denn?
 
select SMS_R_System.Name,
SMS_G_System_SERVICE.DisplayName,
SMS_G_System_SERVICE.Status,
SMS_GEH_System_SERVICE.StartMode
from SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceID = SMS_R_System.ResourceId
inner join SMS_GEH_System_SERVICE on SMS_GEH_System_SERVICE.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_SERVICE.DisplayName != "Ablagemappe"
and SMS_G_System_SERVICE.DisplayName != "Anmeldedienst"
and SMS_G_System_SERVICE.DisplayName != "Hilfe und Support"
and SMS_GEH_System_SERVICE.DisplayName != "Aufgabenplanung"
and SMS_G_System_SERVICE.DisplayName != "Adaptive Helligkeit"
and SMS_G_System_SERVICE.DisplayName != "Automatische Updates"
and SMS_G_System_SERVICE.DisplayName != "Sicherheitscenter"
and SMS_G_System_SERVICE.DisplayName != "Server"
and SMS_G_System_SERVICE.DisplayName != "Plug & Play"
group by SMS_R_System.Name,
SMS_G_System_SERVICE.DisplayName,
SMS_G_System_SERVICE.Status,
SMS_GEH_System_SERVICE.StartMode
order by SMS_G_System_SERVICE.DisplayName
 
Zurück
Oben Unten