Attribute Reference Query

select
    SMS_R_System.ResourceId,
    SMS_R_System.ResourceType,
    SMS_R_System.Name,
    SMS_R_System.SMSUniqueIdentifier,
    SMS_R_System.ResourceDomainORWorkgroup,
    SMS_R_System.Client,
    SMS_G_System_SYSTEM_CONSOLE_USER.LastConsoleUse,
    SMS_G_System_COMPUTER_SYSTEM.TimeStamp
from 
    SMS_R_System
    inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId
    inner join SMS_G_System_SYSTEM_CONSOLE_USER on SMS_G_System_SYSTEM_CONSOLE_USER.ResourceId = SMS_R_System.ResourceId
where
    SMS_G_System_COMPUTER_SYSTEM.UserName = SMS_G_System_SYSTEM_CONSOLE_USER.SystemConsoleUser

Leave a Reply

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