‎08-05-2015 01:26 AM
Solved! Go to Solution.
‎08-06-2015 02:13 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblNetwork.IPAddress As [current IP],
tsysIPLocations.IPLocation As [current IP location],
tblNetworkHist.IPAddress As [recent IP],
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblNetworkHist On tblAssets.AssetID = tblNetworkHist.AssetID
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Where tblNetworkHist.MACaddress = tblNetwork.MACaddress And
tblNetworkHist.IPAddress <> tblNetwork.IPAddress And tblAssetCustom.State = 1
And tblNetworkHist.IPEnabled = 1 And tblNetwork.IPEnabled = 1
Order By tblNetworkHist.Lastchanged Desc
‎08-06-2015 08:44 PM
‎08-06-2015 02:13 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblNetwork.IPAddress As [current IP],
tsysIPLocations.IPLocation As [current IP location],
tblNetworkHist.IPAddress As [recent IP],
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblNetworkHist On tblAssets.AssetID = tblNetworkHist.AssetID
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Where tblNetworkHist.MACaddress = tblNetwork.MACaddress And
tblNetworkHist.IPAddress <> tblNetwork.IPAddress And tblAssetCustom.State = 1
And tblNetworkHist.IPEnabled = 1 And tblNetwork.IPEnabled = 1
Order By tblNetworkHist.Lastchanged Desc
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now