‎10-31-2014 12:33 PM
Solved! Go to Solution.
‎10-31-2014 03:23 PM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.IPAddress,
tblAssets.Username As LastLogonUser,
tblAssets.Userdomain As LastLogonDomain,
tblAssetUserRelations.Username As RelationUser,
tblAssetUserRelations.Userdomain As RelationDomain,
tblAssets.Firstseen,
tblAssets.Lastseen,
Case When tblAssets.Username <> tblAssetUserRelations.Username Or
tblAssets.Userdomain <> tblAssetUserRelations.Userdomain Then 'different'
Else 'same' End As UserComparison
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblAssetUserRelations On tblAssets.AssetID =
tblAssetUserRelations.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
tblAssetUserRelations.Type
Where tsysAssetRelationTypes.Name = 'used by' And tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName
‎10-31-2014 03:31 PM
‎10-31-2014 03:23 PM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.IPAddress,
tblAssets.Username As LastLogonUser,
tblAssets.Userdomain As LastLogonDomain,
tblAssetUserRelations.Username As RelationUser,
tblAssetUserRelations.Userdomain As RelationDomain,
tblAssets.Firstseen,
tblAssets.Lastseen,
Case When tblAssets.Username <> tblAssetUserRelations.Username Or
tblAssets.Userdomain <> tblAssetUserRelations.Userdomain Then 'different'
Else 'same' End As UserComparison
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblAssetUserRelations On tblAssets.AssetID =
tblAssetUserRelations.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
tblAssetUserRelations.Type
Where tsysAssetRelationTypes.Name = 'used by' And tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now