Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
iatech
Engaged Sweeper II
Good morning

I have written the below report in an attempt to pull all of our assets, along with last user logged in info. I also want it to give me firstname and last name for the last user logged in. However, when I attempt to use the tblADusers it seems to pull all of the users that have logged into that machine. Or I get the same name (user last user logged in) for all machines. Any thoughts?

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As [NetBIOS Name],
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssetCustom.Model,
tblOperatingsystem.Caption,
tblAssets.Domain,
tblAssetCustom.Serialnumber,
tblAssets.IPAddress As IPAddress,
tblAssets.Mac As [MAC Address],
tsysIPLocations.IPLocation As [Last Connected At],
tblAssets.Lastseen,
tblAssets.Username As [Last User Login]
From tblAssets
Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tblAssetGroupLink On tblAssets.AssetID = tblAssetGroupLink.AssetID
Inner Join tblAssetGroups On tblAssetGroups.AssetGroupID =
tblAssetGroupLink.AssetGroupID And tblAssetGroupLink.AssetGroupID =
tblAssetGroups.AssetGroupIDWhere
tsysIPLocations.IPLocation Like '%COMPANY NAME%' And
tblAssetCustom.State = 1
0 REPLIES 0

Archive

This board contains archived posts from the retired Lansweeper Forum and Insiders Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now