cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Dave1
Engaged Sweeper
Hello i am using the following report to receive switch related data.
Select Top 1000000 SwitchInformation.AssetID,
SwitchInformation.icon,
SwitchInformation.AssetName,
SwitchInformation.Name As Port,
tsysIPLocations.IPLocation As VLAN,
SwitchInformation.Vlan As VlanName,
Coalesce(tsysOS.Image, tsysAssetTypes1.AssetTypeIcon10) As icon2,
SwitchInformation.DeviceAssetID,
tblAssets.AssetName As ConnectedDevice,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssets.Firstseen
From (Select Top 1000000 tblAssets1.AssetID,
tsysAssetTypes.AssetTypeIcon16 As icon,
tblAssets1.AssetName,
tblSNMPInfo.IfIndex As [If],
tblSNMPInfo.ifName As Name,
tblSNMPInfo.Vlan,
tblAssetMacAddress.AssetID As DeviceAssetID
From tblSNMPInfo
Inner Join tblAssets As tblAssets1 On tblSNMPInfo.AssetID =
tblAssets1.AssetID
Inner Join tsysAssetTypes On tblAssets1.Assettype =
tsysAssetTypes.AssetType
Left Outer Join tblSNMPIfTypes On tblSNMPInfo.IfType =
tblSNMPIfTypes.IfType
Left Outer Join (tblAssetMacAddress
Right Outer Join tblSNMPAssetMac On tblAssetMacAddress.Mac =
tblSNMPAssetMac.AssetMacAddress) On tblSNMPInfo.IfIndex =
tblSNMPAssetMac.IfIndex And tblSNMPInfo.AssetID =
tblSNMPAssetMac.AssetID
Where tblAssets1.AssetID Is Not Null And tsysAssetTypes.AssetTypename =
'Switch'
Order By tblAssets1.AssetName,
[If]) As SwitchInformation
Left Outer Join tblAssets On SwitchInformation.DeviceAssetID =
tblAssets.AssetID
Inner Join tsysAssetTypes As tsysAssetTypes1 On tblAssets.Assettype =
tsysAssetTypes1.AssetType
Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysIPLocations On
tblAssets.LocationID = tsysIPLocations.LocationID
Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblState On tblState.State = tblAssetCustom.State
Where tblAssets.AssetName Not Like 'Uplink' And tblAssets.Lastseen < GetDate() -
90
Order By SwitchInformation.AssetName,
ConnectedDevice


How can i get the "Last Seen" from the Switch:

0 REPLIES 0