‎03-13-2015 03:50 PM
Solved! Go to Solution.
‎03-18-2015 05:16 PM
Select Top 1000000 tblAssetCustom.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber,
tblAssetCustom.PurchaseDate As [Purchase Date],
Case When tblAssetCustom.AssetID In (Select tblPortableBattery.AssetID
From tblPortableBattery) Then tblAssetCustom.Warrantydate
Else DateAdd(year, 2, tblAssetCustom.Warrantydate)
End As [Warranty Expiration],
tsysOS.Image As icon
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where Case When tblAssetCustom.AssetID In (Select tblPortableBattery.AssetID
From tblPortableBattery) Then tblAssetCustom.Warrantydate
Else DateAdd(year, 2, tblAssetCustom.Warrantydate)
End < GetDate() And tblAssetCustom.State = 1
Order By [Warranty Expiration]
‎03-18-2015 05:16 PM
Select Top 1000000 tblAssetCustom.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber,
tblAssetCustom.PurchaseDate As [Purchase Date],
Case When tblAssetCustom.AssetID In (Select tblPortableBattery.AssetID
From tblPortableBattery) Then tblAssetCustom.Warrantydate
Else DateAdd(year, 2, tblAssetCustom.Warrantydate)
End As [Warranty Expiration],
tsysOS.Image As icon
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where Case When tblAssetCustom.AssetID In (Select tblPortableBattery.AssetID
From tblPortableBattery) Then tblAssetCustom.Warrantydate
Else DateAdd(year, 2, tblAssetCustom.Warrantydate)
End < GetDate() And tblAssetCustom.State = 1
Order By [Warranty Expiration]
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now