(Updated) Who was the last person to logon to each PC

Updated to fix a cut&paste error and now it uses a join.

SELECT Distinct
CS.Name0 as ‘PC Name’,
isnull(CS.UserName0,HCS.UserName0) as ‘User Name’
v_GS_COMPUTER_SYSTEM CS Left outer join  v_HS_COMPUTER_SYSTEM HCS on  CS.ResourceID = HCS.ResourceID
HCS.UserName0 is not NULL
Order by

Leave a Reply

Your email address will not be published. Required fields are marked *