‎09-01-2021 03:24 PM
‎09-01-2021 06:57 PM
‎09-01-2021 04:44 PM
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblOperatingsystem On tblOperatingsystem.AssetID = tblAssets.AssetID
Left Join tblWarranty On tblAssets.AssetID = tblWarranty.AssetId
LEFT JOIN (SELECT
tblWarrantyDetails.WarrantyID,
Max(tblWarrantyDetails.WarrantyEndDate) MaxEndDate
FROM
tblWarrantyDetails
GROUP BY
tblWarrantyDetails.WarrantyID) AS MaxWarranty ON MaxWarranty.WarrantyID = tblWarranty.WarrantyID
LEFT JOIN tblWarrantyDetails ON tblWarrantyDetails.WarrantyID = MaxWarranty.WarrantyID AND tblWarrantyDetails.WarrantyEndDate = MaxWarranty.MaxEndDate
Left Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now