‎01-06-2015 11:59 AM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
SubString(SubString(tblADComputers.OU, CharIndex(',', tblADComputers.OU) -
250, 250), 4, 250) As ShortComputerOU,
tblAssets.Username,
tblAssets.Userdomain,
SubString(SubString(tblADusers.OU, CharIndex(',', tblADusers.OU) - 250, 250),
4, 250) As ShortUserOU,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Left Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Where tblAssetCustom.State = 1 And tblComputersystem.PartOfDomain = 1
Order By tblAssets.Domain,
tblAssets.AssetName
‎06-06-2017 10:21 PM
‎05-26-2015 04:22 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now