I am hoping someone can assist me with SQL. I am using the query below. I am using this to get the status of Software Updates to all clients. What I need though to be able to include the Boundary Group Name that the client belongs too. I need this to identify which site the device belongs too as we dont have any other inventory details with this. The query will help with the location of the device, Is it possible to get this included?
select sn.StateName as LastEnforcementState, vrs.name0 as ComputerName, a.AssignmentName as DeploymentName, assc.StateTime , a.CollectionName from v_CIAssignment a join v_AssignmentState_Combined assc on a.AssignmentID=assc.AssignmentID join v_StateNames sn on assc.StateType = sn.TopicType and sn.StateID=isnull(assc.StateID,0) join v_R_System vrs on vrs.ResourceID=assc.ResourceID where a.AssignmentID='xxxxxxxx' order by LastEnforcementState
select sn.StateName as LastEnforcementState, vrs.name0 as ComputerName, a.AssignmentName as DeploymentName, assc.StateTime , a.CollectionName from v_CIAssignment a join v_AssignmentState_Combined assc on a.AssignmentID=assc.AssignmentID join v_StateNames sn on assc.StateType = sn.TopicType and sn.StateID=isnull(assc.StateID,0) join v_R_System vrs on vrs.ResourceID=assc.ResourceID where a.AssignmentID='xxxxxxxx' order by LastEnforcementState