Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!
The query is based in computer name and domain name.
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 from SMS_R_System
where SMS_R_System.FullDomainName = "ALUMNOS.URJC.ES" and (SMS_R_System.SystemOUName = "ALUMNOS.URJC.ES/CS" or SMS_R_System.SystemOUName = "ALUMNOS.URJC.ES/MICROINFORMATICA") and SMS_R_System.Name like "A%-%"
order by
SMS_R_System.Name