‎03-13-2015 07:53 PM
Solved! Go to Solution.
‎03-16-2015 09:59 AM
Select Top 1000000 tblAssets.AssetID,
tblAssetGroups.AssetGroup,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon16 As icon,
tblWarranty.PurchaseCountry,
tblWarranty.ShipDate,
tblWarrantyDetails.WarrantyStartDate,
tblWarrantyDetails.WarrantyEndDate,
tblWarrantyDetails.ServiceType,
Case When GetDate() > tblWarrantyDetails.WarrantyEndDate Then 'yes' Else 'no'
End As Expired,
tblWarranty.Error
From tblAssets
Left Join tblWarranty On tblWarranty.AssetId = tblAssets.AssetID
Left Join tblWarrantyDetails On tblWarranty.WarrantyId =
tblWarrantyDetails.WarrantyId
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join tblAssetGroupLink On tblAssets.AssetID = tblAssetGroupLink.AssetID
Inner Join tblAssetGroups On tblAssetGroups.AssetGroupID =
tblAssetGroupLink.AssetGroupID
Where tblAssetGroups.AssetGroup Like 'YourExampleGroup'
Order By tblAssets.AssetName,
tblWarrantyDetails.WarrantyEndDate Desc
‎03-16-2015 09:59 AM
Select Top 1000000 tblAssets.AssetID,
tblAssetGroups.AssetGroup,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon16 As icon,
tblWarranty.PurchaseCountry,
tblWarranty.ShipDate,
tblWarrantyDetails.WarrantyStartDate,
tblWarrantyDetails.WarrantyEndDate,
tblWarrantyDetails.ServiceType,
Case When GetDate() > tblWarrantyDetails.WarrantyEndDate Then 'yes' Else 'no'
End As Expired,
tblWarranty.Error
From tblAssets
Left Join tblWarranty On tblWarranty.AssetId = tblAssets.AssetID
Left Join tblWarrantyDetails On tblWarranty.WarrantyId =
tblWarrantyDetails.WarrantyId
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join tblAssetGroupLink On tblAssets.AssetID = tblAssetGroupLink.AssetID
Inner Join tblAssetGroups On tblAssetGroups.AssetGroupID =
tblAssetGroupLink.AssetGroupID
Where tblAssetGroups.AssetGroup Like 'YourExampleGroup'
Order By tblAssets.AssetName,
tblWarrantyDetails.WarrantyEndDate Desc
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now