Hello team,
I have just purchased Lansweeper and thus far, i love its capabilities. I would like to run a report altho I am finding it to be quite difficult as I am not overly familiar with SQL yet.
What Im looking for is a report that will list
All Assets by host name | Owners of asset (AD Name)| Manufacture of asset | Model Number |The Svc tag or serial #|
What I've done thus far is but im returning no results. Please help me. Thank you for your time!
Edit: reworked syntax. Looks like TBLasset.assetname is displaying last seen user not owner. on tblAssetUserRelations I did the link from type to tsysAssetRelationType.RelationTypeID but im not getting Owner in report.
Select Top 1000000 tblAssets.AssetName,
tblADusers.Name,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
tblAssetCustom.Warrantydate,
tblAssets.Mac
From tblAssets
Left Join tblADusers On tblAssets.Username = tblADusers.Username And
tblAssets.Userdomain = tblADusers.Userdomain
Left Join tblAssetUserRelations
On tblAssets.AssetID = tblAssetUserRelations.AssetID And
tblADusers.Username = tblAssetUserRelations.Username And
tblADusers.Userdomain = tblAssetUserRelations.Userdomain
Left Join tsysAssetRelationTypes On tblAssetUserRelations.Type =
tsysAssetRelationTypes.RelationTypeID And tblAssetUserRelations.Username =
tsysAssetRelationTypes.ReverseName
Full Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID And
tblAssets.AssetID = tblAssetCustom.AssetID
Where tblADusers.Name != 'NULL'
Order By tblADusers.Name