→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎03-26-2014 04:52 PM
Select Top 1000000 tblState.Statename,
tblAssetCustom.Custom5 As [IT Loan?],
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssetCustom.Custom6,
tblAssets.Username,
tblAssets.Lastseen As Updated,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
tblAssets.Processor,
tblAssets.Memory,
tblADComputers.OU,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate,
tblADusers.Picture,
tblADusers.ManagerADObjectId
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tblAssetUserRelations On tblAssets.AssetID =
tblAssetUserRelations.AssetID
Inner Join tblADusers On tblADusers.Username = tblAssetUserRelations.Username
And tblADusers.Userdomain = tblAssetUserRelations.Userdomain
Where tblState.Statename != 'Sold' And tblAssets.AssetName Like 'LON%'
And tsysAssetTypes.AssetTypename = 'Windows'
Order By tblAssets.AssetName,
tblState.Statename
Solved! Go to Solution.
‎03-26-2014 06:30 PM
Select Top 1000000 tblState.Statename,
tblAssetCustom.Custom5 As [IT Loan?],
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssetCustom.Custom6,
tblAssets.Username,
tblAssets.Userdomain,
tblADusers1.Username As ManagerName,
tblADusers1.Userdomain As ManagerDomain,
tblAssets.Lastseen As Updated,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
tblAssets.Processor,
tblAssets.Memory,
tblADComputers.OU,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate,
tblADusers.Picture,
tblADusers.ManagerADObjectId
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Left Join tblADusers tblADusers1 On tblADusers1.ADObjectID =
tblADusers.ManagerADObjectId
Where tblState.Statename != 'Sold' And tblAssets.AssetName Like 'LON%'
And tsysAssetTypes.AssetTypename = 'Windows'
Order By tblAssets.AssetName,
tblState.Statename
‎03-26-2014 06:30 PM
Select Top 1000000 tblState.Statename,
tblAssetCustom.Custom5 As [IT Loan?],
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssetCustom.Custom6,
tblAssets.Username,
tblAssets.Userdomain,
tblADusers1.Username As ManagerName,
tblADusers1.Userdomain As ManagerDomain,
tblAssets.Lastseen As Updated,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
tblAssets.Processor,
tblAssets.Memory,
tblADComputers.OU,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate,
tblADusers.Picture,
tblADusers.ManagerADObjectId
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Left Join tblADusers tblADusers1 On tblADusers1.ADObjectID =
tblADusers.ManagerADObjectId
Where tblState.Statename != 'Sold' And tblAssets.AssetName Like 'LON%'
And tsysAssetTypes.AssetTypename = 'Windows'
Order By tblAssets.AssetName,
tblState.Statename
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now