‎09-01-2015 08:56 PM
Solved! Go to Solution.
‎09-04-2015 04:51 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
tNetwork.Description As NIC,
tNetwork.IPAddress As IP
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join (Select tblNetwork.AssetID,
tblNetwork.IPAddress,
tblNetwork.Description
From tblNetwork
Where tblNetwork.IPEnabled = 1) tNetwork On tblAssets.AssetID =
tNetwork.AssetID
Where tblAssetCustom.State = 1
Union
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
tblMacNetwork.Name As NIC,
tblMacNetwork.Ipv4 As IP
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblMacNetwork On tblAssets.AssetID = tblMacNetwork.AssetID
Where tblAssetCustom.State = 1
Union
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
tblLinuxNetworkDetection.Name As NIC,
tblLinuxNetworkDetection.Ipv4 As IP
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblLinuxNetworkDetection On tblAssets.AssetID =
tblLinuxNetworkDetection.AssetID
Where tblAssetCustom.State = 1
Union
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
Cast(tblSNMPInfo.IfIndex As nvarchar) As NIC,
tblSNMPInfo.IfIPAddress As IP
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSNMPInfo On tblAssets.AssetID = tblSNMPInfo.AssetID
Where tblAssetCustom.State = 1
Union
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
Null As NIC,
tblAssets.IPAddress As IP
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tsysAssetTypes.AssetTypename Not In ('Windows', 'Apple Mac', 'Linux',
'Unix', 'VMware server') And tblAssetCustom.State = 1 And
Coalesce(tblAssets.IPAddress, '') <> ''
Union
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
Cast(tblVmwareNetwork.Name As nvarchar) As NIC,
tblVmwareNetwork.IPAddress As IP
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblVmwareNetwork On tblVmwareNetwork.AssetID = tblAssets.AssetID
Where tblAssetCustom.State = 1
Order By AssetName,
NIC
‎09-04-2015 04:51 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
tNetwork.Description As NIC,
tNetwork.IPAddress As IP
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join (Select tblNetwork.AssetID,
tblNetwork.IPAddress,
tblNetwork.Description
From tblNetwork
Where tblNetwork.IPEnabled = 1) tNetwork On tblAssets.AssetID =
tNetwork.AssetID
Where tblAssetCustom.State = 1
Union
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
tblMacNetwork.Name As NIC,
tblMacNetwork.Ipv4 As IP
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblMacNetwork On tblAssets.AssetID = tblMacNetwork.AssetID
Where tblAssetCustom.State = 1
Union
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
tblLinuxNetworkDetection.Name As NIC,
tblLinuxNetworkDetection.Ipv4 As IP
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblLinuxNetworkDetection On tblAssets.AssetID =
tblLinuxNetworkDetection.AssetID
Where tblAssetCustom.State = 1
Union
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
Cast(tblSNMPInfo.IfIndex As nvarchar) As NIC,
tblSNMPInfo.IfIPAddress As IP
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSNMPInfo On tblAssets.AssetID = tblSNMPInfo.AssetID
Where tblAssetCustom.State = 1
Union
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
Null As NIC,
tblAssets.IPAddress As IP
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tsysAssetTypes.AssetTypename Not In ('Windows', 'Apple Mac', 'Linux',
'Unix', 'VMware server') And tblAssetCustom.State = 1 And
Coalesce(tblAssets.IPAddress, '') <> ''
Union
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
Cast(tblVmwareNetwork.Name As nvarchar) As NIC,
tblVmwareNetwork.IPAddress As IP
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblVmwareNetwork On tblVmwareNetwork.AssetID = tblAssets.AssetID
Where tblAssetCustom.State = 1
Order By AssetName,
NIC
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now