Much better. Thanks a lot Garth.

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Garth Jones
Sent: Thursday, 26 December, 2013 12:22 AM
To: [email protected]
Subject: RE: [mssms] How to get Unique Computer Name in the output?

 

Use v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP instead it is the Top Console user.

 

 

 

 

 

Garth Jones

Chief Architect

 

 <http://www.enhansoft.com/> www.Enhansoft.com

 <http://www.enhansoft.com/> Description: Description:
cid:[email protected]

Enhancing Your Business

 <http://be.enhansoft.com/> Description: Description: Description:
Description: Description: Description: Description:
cid:[email protected] <https://twitter.com/enhansoft>
Description: Description: Description: Description: Description:
Description: Description: cid:[email protected]
<http://www.facebook.com/EnhansoftInc> Description: Description:
Description: Description: Description: Description: Description:
cid:[email protected]
<http://www.youtube.com/user/Enhansoft/videos> Description: Description:
Description: Description: Description: Description: Description:
Description: Description: Description: Description: Description:
Description: Description: Description: Enhansoft's YouTube Page
<http://myitforum.com/myitforumwp/community/groups/enhansoft/> Description:
Description: Description: Description: Description: Description:
Description: cid:[email protected]

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Hotmail
Sent: Tuesday, December 24, 2013 8:22 PM
To: [email protected]
Subject: [mssms] How to get Unique Computer Name in the output?

 

Merry Christmas Community Members. J

 

In Spite of using Select Distinct the result comes up with same computer
name multiple times (depending on the number of users who had logged in)

 

How can I get Unique Computer Name in the output?

 

Select DISTINCT V_R_SYSTEM.Name0 AS [Computer Name] ,
v_Add_Remove_Programs.DisplayName0 AS [Software Name]
,v_Add_Remove_Programs.Version0 AS [Version]
,v_Add_Remove_Programs.InstallDate0 AS [Installation
Date],v_GS_SYSTEM_CONSOLE_USER.SystemConsoleUser0 AS [User], ROW_NUMBER ()
over (order by "DisplayName0") AS [No.]

from v_R_System 

INNER JOIN v_GS_SYSTEM_CONSOLE_USER ON v_R_System.ResourceID =
v_GS_SYSTEM_CONSOLE_USER.ResourceID

left join v_Add_Remove_Programs on
v_Add_Remove_Programs.ResourceID=V_R_SYSTEM.ResourceID

left join v_ClientCollectionMembers on
v_ClientCollectionMembers.ResourceID=V_R_SYSTEM.ResourceID 

where v_ClientCollectionMembers.CollectionID= @CollectionID

and v_Add_Remove_Programs.DisplayName0='Symantec Endpoint Protection' order
by [NO.]

 

 

 



<<image001.jpg>>

<<image002.png>>

<<image003.png>>

<<image004.jpg>>

<<image005.png>>

<<image006.png>>

Reply via email to