To stop the query returning duplicates, just change it to ‘select distinct a.UserAtHost …’
Also, can extend the query slightly to provide a bit more info such as:
Declare @FrontEndServerID int Set @FrontEndServerID=2 Select Fqdn "FE-Server-Name" from rtcdyn.dbo.FrontEnd where FrontEndId=@FrontEndServerID Select count(distinct a.UserAtHost) "Active-Users-Count" from rtc.dbo.Resource a, rtcdyn.dbo.DeliveryContext b where a.ResourceId=b.SubscriberId and b.FrontEndId=@FrontEndServerID Select distinct a.UserAtHost "Active-Users" from rtc.dbo.Resource a, rtcdyn.dbo.DeliveryContext b where a.ResourceId=b.SubscriberId and b.FrontEndId=@FrontEndServerID order by a.UserAtHost asc
Popularity: 8% [?]
