→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎05-01-2017 09:40 PM
Solved! Go to Solution.
‎05-02-2017 02:14 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Username,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssets.OScode,
tblAssetCustom.Location as assetLocation,
tsysIPLocations.IPLocation,
tblADComputers.Location As ADLocation,
mapLocation.AssetName
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID
Left Join tblADComputers on tblADComputers.AssetID = tblAssets.AssetID
Left Join (Select Top 1000000 tblAssets.AssetID As AssetID, tblAssets1.AssetName From tblAssets
Inner Join tblAssetRelations On tblAssetRelations.ChildAssetID = tblAssets.AssetID
Inner Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID = tblAssetRelations.Type
Inner Join tblAssets tblAssets1 On tblAssets1.AssetID = tblAssetRelations.ParentAssetID
Where tsysAssetRelationTypes.Name = 'is located in') as mapLocation on mapLocation.AssetID = tblAssets.AssetID
Where tsysAssetTypes.AssetTypename = 'Windows'
Order By tblAssets.AssetName
‎05-02-2017 04:06 PM
‎05-02-2017 02:14 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Username,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssets.OScode,
tblAssetCustom.Location as assetLocation,
tsysIPLocations.IPLocation,
tblADComputers.Location As ADLocation,
mapLocation.AssetName
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID
Left Join tblADComputers on tblADComputers.AssetID = tblAssets.AssetID
Left Join (Select Top 1000000 tblAssets.AssetID As AssetID, tblAssets1.AssetName From tblAssets
Inner Join tblAssetRelations On tblAssetRelations.ChildAssetID = tblAssets.AssetID
Inner Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID = tblAssetRelations.Type
Inner Join tblAssets tblAssets1 On tblAssets1.AssetID = tblAssetRelations.ParentAssetID
Where tsysAssetRelationTypes.Name = 'is located in') as mapLocation on mapLocation.AssetID = tblAssets.AssetID
Where tsysAssetTypes.AssetTypename = 'Windows'
Order By tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now