→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎03-29-2017 02:55 PM
Solved! Go to Solution.
‎05-10-2017 11:44 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username As [Last logged-on user],
tblAssetCustom.Custom1 As [YLT-nr],
tsysIPLocations.IPLocation,
tblAssetCustom.Model,
tblADusers.Department As Costcenter,
tblADusers.Name As [PC Owner]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join tblAssetUserRelations
On tblAssets.AssetID = tblAssetUserRelations.AssetID
Left Join tblADusers On tblADusers.Username = tblAssetUserRelations.Username
And tblADusers.Userdomain = tblAssetUserRelations.Userdomain
Left Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
tblAssetUserRelations.Type
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssetCustom.State = 1 And tsysAssetTypes.AssetTypename = 'Windows'
‎05-10-2017 11:44 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username As [Last logged-on user],
tblAssetCustom.Custom1 As [YLT-nr],
tsysIPLocations.IPLocation,
tblAssetCustom.Model,
tblADusers.Department As Costcenter,
tblADusers.Name As [PC Owner]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join tblAssetUserRelations
On tblAssets.AssetID = tblAssetUserRelations.AssetID
Left Join tblADusers On tblADusers.Username = tblAssetUserRelations.Username
And tblADusers.Userdomain = tblAssetUserRelations.Userdomain
Left Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
tblAssetUserRelations.Type
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssetCustom.State = 1 And tsysAssetTypes.AssetTypename = 'Windows'
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now