
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.
- SELECT DISTINCT [DeviceID]
- FROM [dbo].[PivotDeviceToDiscoveryRoleTemplate] piv
- join [dbo].[Device] device on piv.DeviceID = device.nDeviceID
- join [dbo].[DiscoveryRoleTemplates] role on piv.DiscoveryRoleTemplateID = role.nDiscoveryRoleTemplateID
- where device.bRemoved = 0 AND role.KindOfRole = 1 AND ((COALESCE(NULLIF(piv.AlternateName, ''), role.Name)) LIKE N'%Cisco%')