select distinct 
  SMS_R_System.Name,
  SMS_R_System.ResourceId
from  
  SMS_R_System 
where 
  SMS_R_System.ResourceId in (  select 
            SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID 
          from 
            SMS_G_System_ADD_REMOVE_PROGRAMS 
          where 
            SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Microsoft Lync 2010")
  or SMS_R_System.ResourceId in (  select 
            SMS_G_System_ADD_REMOVE_PROGRAMS_64.ResourceID 
          from 
            SMS_G_System_ADD_REMOVE_PROGRAMS_64 
          where 
            SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName = "Microsoft Lync 2010")