‎06-03-2019 03:46 PM
Select Top 1000000 tblAssets.AssetName,
Count(tblAssets.AssetName) As Anzahl,
tblAssets.AssetID
From (Select Top 1000000 tblAssets_1.AssetID,
tblAssets_1.AssetName,
tblSNMPInfo.IfIndex As [If],
tblSNMPInfo.Vlan,
tblAssetMacAddress.AssetID As deviceassetid
From tblSNMPInfo
Inner Join tblAssets As tblAssets_1 On tblSNMPInfo.AssetID =
tblAssets_1.AssetID
Inner Join tsysAssetTypes On tblAssets_1.Assettype =
tsysAssetTypes.AssetType
Left Outer Join tblSNMPIfTypes On tblSNMPInfo.IfType =
tblSNMPIfTypes.IfType
Left Outer Join (tblAssetMacAddress
Right Outer Join tblSNMPAssetMac On tblAssetMacAddress.Mac =
tblSNMPAssetMac.AssetMacAddress) On tblSNMPInfo.IfIndex =
tblSNMPAssetMac.IfIndex And tblSNMPInfo.AssetID =
tblSNMPAssetMac.AssetID
Where tblAssets_1.AssetID Is Not Null And tblAssets_1.Assettype = 6
Order By tblAssets_1.AssetName,
[If]) As aaa
Left Outer Join tblAssets On aaa.deviceassetid = tblAssets.AssetID
Left Outer Join tsysAssetTypes As tsysAssetTypes_1 On tblAssets.Assettype =
tsysAssetTypes_1.AssetType
Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID
Left Outer Join tsysIPLocations On tblAssets.LocationID =
tsysIPLocations.LocationID
Where tsysAssetTypes_1.AssetTypename = 'windows'
Group By tblAssets.AssetName,
tblAssets.AssetID
‎06-04-2019 02:29 PM
Select Top 1000000 tblAssets.AssetName,
Count(tblAssets.AssetName) As Anzahl,
tblAssets.AssetID
From (Select Top 1000000 tblAssets_1.AssetID,
tblAssets_1.AssetName,
tblAssetMacAddress.AssetID As deviceassetid
From tblSNMPInfo
Inner Join tblAssets As tblAssets_1 On tblSNMPInfo.AssetID =
tblAssets_1.AssetID
Left Outer Join (tblAssetMacAddress
Right Outer Join tblSNMPAssetMac On tblAssetMacAddress.Mac =
tblSNMPAssetMac.AssetMacAddress) On tblSNMPInfo.IfIndex =
tblSNMPAssetMac.IfIndex And tblSNMPInfo.AssetID =
tblSNMPAssetMac.AssetID
Where tblAssets_1.AssetID Is Not Null And tblAssets_1.Assettype =
6) As aaa
Left Outer Join tblAssets On aaa.deviceassetid = tblAssets.AssetID
Left Outer Join tsysAssetTypes As tsysAssetTypes_1 On tblAssets.Assettype =
tsysAssetTypes_1.AssetType
Where tsysAssetTypes_1.AssetTypename = 'windows'
Group By tblAssets.AssetName,
tblAssets.AssetID
Having Count(tblAssets.AssetName) > 1
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now