Your company's ad could live here and reach over 50,000 people a month!

Share This Post

Cannot get rid of duplicate rows on an Add or Remove Programs query

For for details see post. http://social.technet.microsoft.com/Forums/en-US/configmgrinventory/thread/3bea8fa6-968a-4f0e-b412-469577e409aa

Select DISTINCT 
  SYS.Netbios_Name0 AS 'Name',
  case SEM.ResourceID
    When NULL THEN 'N'
    Else 'Y'
  End AS 'SafeNet?',
  ARP.Timestamp
  
From 
  dbo.v_R_System SYS
  left outer JOIN dbo.v_Add_Remove_Programs ARP ON SYS.ResourceID  = ARP.ResourceID and ARP.DisplayName0 = 'Update for Windows Server 2003 (KB943295)'
  LEFT OUTER JOIN (SELECT ARP.ResourceID From dbo.v_Add_Remove_Programs ARP WHERE ARP.DisplayName0 = 'Update for Windows Server 2003 (KB943295)') SEM on SYS.ResourceID = SEM.ResourceID 
WHERE 
  SYS.Netbios_Name0 LIKE 'Dell%' 
ORDER BY 
  SYS.Netbios_Name0


Share This Post

Leave a Reply