‎10-21-2020 10:43 PM
Solved! Go to Solution.
‎10-22-2020 07:05 PM
Select Top 1000000
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.Version,
tblAssets.Lastseen,
tblUSBDevices.Manufacturer As USBDeviceManufacturer,
tblUSBDevices.Name As USBDeviceName
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblUSBDevices On tblAssets.AssetID = tblUSBDevices.AssetID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where
tblAssetCustom.State = 1
AND ( tblUSBDevices.Manufacturer LIKE 'Microsoft%'
OR tblUSBDevices.Manufacturer LIKE 'Logitech%')
AND ( tblUSBDevices.Name Like '%webcam%'
OR tblUSBDevices.Name Like '%LifeCam%')
AND NOT (tblUSBDevices.Name Like '%microphone%')
Order By
tblUSBDevices.Manufacturer,
USBDeviceName,
tblAssets.Domain,
tblAssets.AssetName
‎10-23-2020 05:29 PM
AND ( tblUSBDevices.Name Like '%webcam%'
OR tblUSBDevices.Name Like '%LifeCam%')
AND tblUSBDevices.Name Like '%cam%'
‎10-22-2020 07:05 PM
Select Top 1000000
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.Version,
tblAssets.Lastseen,
tblUSBDevices.Manufacturer As USBDeviceManufacturer,
tblUSBDevices.Name As USBDeviceName
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblUSBDevices On tblAssets.AssetID = tblUSBDevices.AssetID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where
tblAssetCustom.State = 1
AND ( tblUSBDevices.Manufacturer LIKE 'Microsoft%'
OR tblUSBDevices.Manufacturer LIKE 'Logitech%')
AND ( tblUSBDevices.Name Like '%webcam%'
OR tblUSBDevices.Name Like '%LifeCam%')
AND NOT (tblUSBDevices.Name Like '%microphone%')
Order By
tblUSBDevices.Manufacturer,
USBDeviceName,
tblAssets.Domain,
tblAssets.AssetName
‎10-23-2020 05:38 PM
RC62N wrote:
Since you know that you want to find Microsoft and Logitech webcams, it would probably be simpler to filter by inclusion than by exclusion, i.e. "show me anything like this" vs "show me anything except this list".
If you only want Microsoft and Logitech devices, that's your first filter: USB device manufacturer.
Since you know the various model names of their webcams, you can make a short list of device name filters. In my inventory, "webcam" is common to most webcams and "LifeCam" to several Microsoft webcams. A few of them include "webcam" as part of the mic's description, so I've added an extra filter to eliminate those.
Adding an ORDER BY clause lets you specify how you want the results sorted.Select Top 1000000
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.Version,
tblAssets.Lastseen,
tblUSBDevices.Manufacturer As USBDeviceManufacturer,
tblUSBDevices.Name As USBDeviceName
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblUSBDevices On tblAssets.AssetID = tblUSBDevices.AssetID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where
tblAssetCustom.State = 1
AND ( tblUSBDevices.Manufacturer LIKE 'Microsoft%'
OR tblUSBDevices.Manufacturer LIKE 'Logitech%')
AND ( tblUSBDevices.Name Like '%webcam%'
OR tblUSBDevices.Name Like '%LifeCam%')
AND NOT (tblUSBDevices.Name Like '%microphone%')
Order By
tblUSBDevices.Manufacturer,
USBDeviceName,
tblAssets.Domain,
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now