You amazing guys helped me with this report before.
https://www.lansweeper.com/forum/yaf_postsm64039_Webcam-report--the-wrong-way.aspx#post64039
I have modified and added to it somewhat since then and whenever I run it, it now duplicates a pc, with the same webcam, with only one webcam attached, both Dell and HP, laptops and desktops, but bizarrely, some computers are shown only once, with the same hardware that is being duplicated! So to say I am lost is an understatement, I have had a look and browsed through the forum, but I was unable to see anything about duplicated results, any help greatly appreciated.
Here is my code
Select Top 1000000 Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As
icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
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 (tblUSBDevices.Manufacturer Like 'Microsoft%' Or
tblUSBDevices.Manufacturer Like 'Logitech%') And
Not (tblUSBDevices.Name Like '%microphone%') And
tblUSBDevices.Name Not Like '%Microsoft LifeCam Front%' And
tblUSBDevices.Name Not Like '%UVC Camera%' And tblUSBDevices.Name Not Like
'%Microsoft LifeCam Rear%' And tblUSBDevices.Name Not Like 'Integrated Webcam'
And tblUSBDevices.Name Not Like '%ConferenceCam Connect%' And
tblUSBDevices.Name Like '%cam%' And tblAssetCustom.State = 1
Order By USBDeviceManufacturer,
USBDeviceName,
tblAssets.Domain,
tblAssets.AssetName