‎11-04-2016 12:14 PM
Select Top 1000000 tblAssetCustom.AssetID,
tblAssets.AssetName,
tblAssetCustom.PurchaseDate As [Purchase Date],
tblAssetCustom.Warrantydate As [Warranty Expiration],
tblAssetCustom.Serialnumber,
(Case
When tsysIPLocations.IPLocation Is Not Null Then tsysIPLocations.IPLocation
Else 'Undefined' End) As IPLocation
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Where tblAssetCustom.Warrantydate < GetDate() + 30 And
tblAssetCustom.Warrantydate < GetDate() And tblAssets.Assettype =X
And tblAssetCustom.State = 1
Order By tblAssets.AssetName
Select Top 1000000 tblAssetCustom.AssetID,
tblAssets.AssetName,
tblAssetCustom.PurchaseDate As [Purchase Date],
tblAssetCustom.Warrantydate As [Warranty Expiration],
tblAssetCustom.Serialnumber,
(Case
When tsysIPLocations.IPLocation Is Not Null Then tsysIPLocations.IPLocation
Else 'Undefined' End) As IPLocation
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Where tblAssetCustom.Warrantydate < GetDate() + 30 And
tblAssetCustom.Warrantydate > GetDate() And tblAssets.Assettype =X
And tblAssetCustom.State = 1
Order By tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now