→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cloy_tobola
Engaged Sweeper
The following report works find and produces a list of 4,700+ devices.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssetCustom.State = 1


When I add the WarrantyEndDate field so I can run an asset management report, I can only see Dell devices (a total of 1144).

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblWarrantyDetails.WarrantyEndDate
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblWarranty On tblAssets.AssetID = tblWarranty.AssetId
Inner Join tblWarrantyDetails On tblWarranty.WarrantyId =
tblWarrantyDetails.WarrantyId
Where tblAssetCustom.State = 1


Assistance in running the full report with Warranty End Dates (where applicable), would be helpful.

Thanks!

1 ACCEPTED SOLUTION
RCorbeil
Honored Sweeper II
Most of your assets must have no entries in the warranty tables. Try changing the INNER joins on tblWarranty and tblWarrantyDetails to LEFT joins. You should see blank values where there is no warranty end date instead of the entire row being eliminated from the result set. (See here and here for details on the difference between inner and left joins.)

View solution in original post

1 REPLY 1
RCorbeil
Honored Sweeper II
Most of your assets must have no entries in the warranty tables. Try changing the INNER joins on tblWarranty and tblWarrantyDetails to LEFT joins. You should see blank values where there is no warranty end date instead of the entire row being eliminated from the result set. (See here and here for details on the difference between inner and left joins.)