cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
assaflev
Engaged Sweeper
Basically I would like to have help with changing the basic "Laptops" report so it will also show me the "Last user" in row.

Should be easy for you masters.

TIA
1 ACCEPTED SOLUTION
MikeMc
Champion Sweeper II
This should work:
Select Top 100000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tsysAssetTypes.AssetTypename As Type,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblSystemEnclosure On tblSystemEnclosure.AssetID =
tblAssets.AssetID
Inner Join TsysChassisTypes On TsysChassisTypes.Chassistype =
tblSystemEnclosure.ChassisTypes
Where TsysChassisTypes.ChassisName In ('Laptop', 'Portable', 'Notebook') And
tblAssetCustom.State = 1
Order By tblAssets.AssetName

View solution in original post

1 REPLY 1
MikeMc
Champion Sweeper II
This should work:
Select Top 100000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tsysAssetTypes.AssetTypename As Type,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblSystemEnclosure On tblSystemEnclosure.AssetID =
tblAssets.AssetID
Inner Join TsysChassisTypes On TsysChassisTypes.Chassistype =
tblSystemEnclosure.ChassisTypes
Where TsysChassisTypes.ChassisName In ('Laptop', 'Portable', 'Notebook') And
tblAssetCustom.State = 1
Order By tblAssets.AssetName