Mike Rockwell (Progress Software) asked a question.

Devices with the same Brand.

This query is used with a WUG dynamic group to display all devices with a specific brand. At the end of the query, enter the Brand you want to return in between the % %. In this example, it uses Cisco.

 

  1. SELECT DISTINCT [DeviceID]
  2. FROM [dbo].[PivotDeviceToDiscoveryRoleTemplate] piv
  3. join [dbo].[Device] device on piv.DeviceID = device.nDeviceID
  4. join [dbo].[DiscoveryRoleTemplates] role on piv.DiscoveryRoleTemplateID = role.nDiscoveryRoleTemplateID
  5. where device.bRemoved = 0 AND role.KindOfRole = 1 AND ((COALESCE(NULLIF(piv.AlternateName, ''), role.Name)) LIKE N'%Cisco%')