‎03-30-2015 09:58 PM
Solved! Go to Solution.
‎03-31-2015 06:48 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
tblAssets.Lasttried,
tsysAssetRelationTypes.Name As Connection,
tConnected.AssetName As [Connected asset]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblAssetRelations
On tblAssets.AssetID = tblAssetRelations.ParentAssetID
Left Join tblAssets tConnected On tConnected.AssetID =
tblAssetRelations.ChildAssetID
Left Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
tblAssetRelations.Type
Where tblAssetCustom.State = 1 And Coalesce(tblAssets.Username, '') <> ''
Order By tblAssets.Username,
tblAssets.AssetName,
[Connected asset]
‎03-31-2015 09:52 PM
‎03-31-2015 06:48 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
tblAssets.Lasttried,
tsysAssetRelationTypes.Name As Connection,
tConnected.AssetName As [Connected asset]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblAssetRelations
On tblAssets.AssetID = tblAssetRelations.ParentAssetID
Left Join tblAssets tConnected On tConnected.AssetID =
tblAssetRelations.ChildAssetID
Left Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
tblAssetRelations.Type
Where tblAssetCustom.State = 1 And Coalesce(tblAssets.Username, '') <> ''
Order By tblAssets.Username,
tblAssets.AssetName,
[Connected asset]
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now