‎02-24-2022 09:19 PM
Solved! Go to Solution.
‎02-25-2022 10:27 PM
Convert(Decimal(8,2), DateDiff(dd, PurchaseDate, GetDate())/365.25) AS Age
‎02-25-2022 10:32 PM
‎02-25-2022 10:27 PM
Convert(Decimal(8,2), DateDiff(dd, PurchaseDate, GetDate())/365.25) AS Age
‎02-25-2022 06:20 PM
Select Top 1000000 tblADusers.Department As Department,
tblADusers.Lastname As [Last Name],
tblADusers.Firstname As [First Name],
tblADusers.Title As [Job Title],
tblassets.AssetName As [Computer Name],
tblassetcustom.Manufacturer As Manufacturer,
tblassetcustom.Model As Model,
tblassetcustom.PurchaseDate As PurchaseDate
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Inner Join lansweeperdb.dbo.tblADusers On tblassets.Username =
tblADusers.Username
Inner Join lansweeperdb.dbo.tblAssetUserRelations On tblassets.AssetID =
tblAssetUserRelations.AssetID
Where tblassets.AssetName Like '%Computer%' And tsysassettypes.AssetTypename
Like '%Window%' And tblAssetUserRelations.EndDate Is Null And
tblassetcustom.State = 1
Order By Department,
[Last Name],
[Computer Name]
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now