Ok. So my Boss has completely changed the criteria of the report now and wants all assets on our backend infrastructure network, so I have completely rejigged the report and it looks MUCH more like what he wants.
HOWEVER, its seems a few servers in 1 location are duplicated. If I search for these assets under the ASSETS>DOMIAN and then our domain, and search for the AssetName, I can see only 1.
However, when I run the below report, I get duplicate servers for any ASSETNAMES starting NYC.
Scan times, hostnames, usernames, IP address, etc all seem to be the same!
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username,
tblAssets.IPAddress,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssetCustom.State As State,
tblState.Statename,
tblAssetCustom.BarCode,
tblAssetUserRelations.Username As Owner,
tsysAssetTypes.AssetTypeIcon10 As icon,
tsysIPLocations.IPLocation,
tsysAssetTypes.AssetTypename,
tblOperatingsystem.Caption
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Inner Join tblState On tblState.State = tblAssetCustom.State
Left Join tblAssetUserRelations On
tblAssets.AssetID = tblAssetUserRelations.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblOperatingsystem On tblAssets.AssetID = tblOperatingsystem.AssetID
Where (tblState.Statename = 'active' And tsysIPLocations.IPLocation Like 'uc%')
Or
(tsysIPLocations.IPLocation Like '%server%') Or
(tsysIPLocations.IPLocation Like 'chassis%') Or
(tsysIPLocations.IPLocation Like 'cucm%')
Order By tblAssets.AssetName
Would really appreciate any help on cracking this.