‎01-26-2015 04:39 PM
Solved! Go to Solution.
‎01-27-2015 07:35 PM
Select Distinct Top 1000000 tblAssets.AssetName,
tblAssets.Username,
tsysAssetTypes.AssetTypeIcon16 As icon,
tblWarranty.PurchaseCountry,
Max(tblWarrantyDetails.WarrantyEndDate) As [warranty end date],
Case When GetDate() > Max(tblWarrantyDetails.WarrantyEndDate) Then 'yes'
Else 'no' End As Expired,
tblAssets.Lastseen,
tsysOS.OSname,
tblAssets.OScode
From tblWarranty
Inner Join tblWarrantyDetails On tblWarranty.WarrantyId =
tblWarrantyDetails.WarrantyId
Inner Join tblAssets On tblWarranty.AssetId = tblAssets.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where Not (tblWarranty.LastWarrantySuccess Is Null)
Group By tblAssets.AssetName,
tblAssets.Username,
tsysAssetTypes.AssetTypeIcon16,
tblWarranty.PurchaseCountry,
tblAssets.Lastseen,
tsysOS.OSname,
tblAssets.OScode
Order By tblAssets.AssetName
‎02-09-2015 03:47 PM
‎02-09-2015 03:22 PM
‎02-09-2015 03:03 PM
Select Distinct Top 1000000 tblAssets.AssetName,
tblAssets.Username,
tsysAssetTypes.AssetTypeIcon16 As icon,
tblWarranty.PurchaseCountry,
Max(tblWarrantyDetails.WarrantyEndDate) As [warranty end date],
Case When GetDate() > Max(tblWarrantyDetails.WarrantyEndDate) Then 'yes'
Else 'no' End As Expired,
tblAssets.Lastseen,
tsysOS.OSname,
tblAssets.OScode,
tsysIPLocations.IPLocation,
tblAssets.IPAddress
From tblWarranty
Inner Join tblWarrantyDetails On tblWarranty.WarrantyId =
tblWarrantyDetails.WarrantyId
Inner Join tblAssets On tblWarranty.AssetId = tblAssets.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Where Not (tblWarranty.LastWarrantySuccess Is Null)
Group By tblAssets.AssetName,
tblAssets.Username,
tsysAssetTypes.AssetTypeIcon16,
tblWarranty.PurchaseCountry,
tblAssets.Lastseen,
tsysOS.OSname,
tblAssets.OScode,
tsysIPLocations.IPLocation,
tblAssets.IPAddress
Order By tblAssets.AssetName
‎02-04-2015 01:24 PM
‎01-28-2015 08:38 AM
‎01-27-2015 07:35 PM
Select Distinct Top 1000000 tblAssets.AssetName,
tblAssets.Username,
tsysAssetTypes.AssetTypeIcon16 As icon,
tblWarranty.PurchaseCountry,
Max(tblWarrantyDetails.WarrantyEndDate) As [warranty end date],
Case When GetDate() > Max(tblWarrantyDetails.WarrantyEndDate) Then 'yes'
Else 'no' End As Expired,
tblAssets.Lastseen,
tsysOS.OSname,
tblAssets.OScode
From tblWarranty
Inner Join tblWarrantyDetails On tblWarranty.WarrantyId =
tblWarrantyDetails.WarrantyId
Inner Join tblAssets On tblWarranty.AssetId = tblAssets.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where Not (tblWarranty.LastWarrantySuccess Is Null)
Group By tblAssets.AssetName,
tblAssets.Username,
tsysAssetTypes.AssetTypeIcon16,
tblWarranty.PurchaseCountry,
tblAssets.Lastseen,
tsysOS.OSname,
tblAssets.OScode
Order By tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now