cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lnswpiedo
Engaged Sweeper
Hi

i need a report for only printers out of warranty (matching the warranty field).
I try to customize this:

Select Top 1000000 tblAssetCustom.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tsysAssetTypes.AssetTypename,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber,
tblAssetCustom.Purchasedate As [Purchase Date],
tblAssetCustom.warrantydate As [Warranty Expiration],
tsysAssetTypes.AssetTypeIcon10 As icon
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssets.Assettype <> 66
Order By [Warranty Expiration] Desc

but do i need to change the (tblAssets.Assettype <> 66)with?
1 ACCEPTED SOLUTION
RCorbeil
Honored Sweeper II
Look for yourself:
SELECT
tsysAssetTypes.AssetType,
tsysAssetTypes.AssetTypeName
FROM
tsysAssetTypes
ORDER BY
tsysAssetTypes.AssetTypeName

If you skim the list of asset types, you'll find that printer is 16. Or you could filter on the description rather than the type ID.
WHERE
tsysAssetTypes.AssetTypeName = 'Printer'

View solution in original post

2 REPLIES 2
lnswpiedo
Engaged Sweeper
Bingo, it works!
RCorbeil
Honored Sweeper II
Look for yourself:
SELECT
tsysAssetTypes.AssetType,
tsysAssetTypes.AssetTypeName
FROM
tsysAssetTypes
ORDER BY
tsysAssetTypes.AssetTypeName

If you skim the list of asset types, you'll find that printer is 16. Or you could filter on the description rather than the type ID.
WHERE
tsysAssetTypes.AssetTypeName = 'Printer'