cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jonarm
Engaged Sweeper
This is probably super simple but I could not find any in my forum search.

I am trying to get a report on my laptops that have a warranty expiration that ends by the end of next year so I know what to refresh during the next year.

With this report I get no results so I think my warrant date format must be wrong. Can anyone help? I tried without the chassis but it did not help.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysAssetTypes.AssetTypename As AssetType,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
Coalesce(tsysOS.OSname, tblMacOSInfo.SystemVersion, tblLinuxSystem.OSRelease)
As OS,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssetCustom.PurchaseDate As PurchaseDate,
tblAssetCustom.Warrantydate As WarrantyExpiration,
tblSystemEnclosure.ChassisTypes,
tblSystemEnclosure.SerialNumber
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tblState On tblState.State = tblAssetCustom.State
Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
Left Join tblMacOSInfo On tblAssets.AssetID = tblMacOSInfo.AssetID
Left Join tblLinuxSystem On tblAssets.AssetID = tblLinuxSystem.AssetID
Inner Join tblSystemEnclosure On
tblAssets.AssetID = tblSystemEnclosure.AssetID
Where (tblAssetCustom.Warrantydate < 12 / 31 / 2021 And
tblSystemEnclosure.ChassisTypes = 9) Or
(tblSystemEnclosure.ChassisTypes = 10)
Group By tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysAssetTypes.AssetTypename,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10),
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
Coalesce(tsysOS.OSname, tblMacOSInfo.SystemVersion, tblLinuxSystem.OSRelease),
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate,
tblSystemEnclosure.ChassisTypes,
tblSystemEnclosure.SerialNumber
Order By WarrantyExpiration,
tblAssets.Domain,
tblAssets.AssetName
0 REPLIES 0