‎02-15-2013 06:05 PM
Solved! Go to Solution.
‎02-21-2013 01:56 PM
‎02-21-2013 03:38 PM
with a1 as
(
select * from tblassets
)
select
a.assetid as [Asset ID],
a.assetname as [Asset Name],
c.ou as [Organization Unit],
a1.assetname as [Switch],
si.ifdescription as [Port]
from tblassetmacaddress as am
inner join tblsnmpassetmac as sam on am.mac = sam.assetmacaddress
inner join tblsnmpinfo as si on sam.assetid = si.assetid and sam.ifindex = si.ifindex
inner join tblassets as a on am.assetid = a.assetid
inner join a1 on si.assetid = a1.assetid
left outer join dbo.tbladcomputers as c on a.assetid = c.assetid
order by a1.assetname, si.ifindex
‎02-21-2013 01:56 PM
‎02-21-2013 09:45 AM
‎02-19-2013 06:09 PM
‎02-19-2013 05:17 PM
‎02-19-2013 05:11 PM
‎02-19-2013 04:22 PM
‎02-19-2013 03:01 PM
SELECT TOP (100) PERCENT dbo.tblAssets.AssetID, dbo.tblAssets.AssetName, dbo.tblADComputers.OU, tblAssets_1.AssetName AS Switch,
dbo.tblSNMPInfo.IfDescription AS Port
FROM dbo.tblAssetMacAddress INNER JOIN
dbo.tblSNMPAssetMac ON dbo.tblAssetMacAddress.Mac = dbo.tblSNMPAssetMac.AssetMacAddress INNER JOIN
dbo.tblSNMPInfo ON dbo.tblSNMPAssetMac.AssetID = dbo.tblSNMPInfo.AssetID AND
dbo.tblSNMPAssetMac.IfIndex = dbo.tblSNMPInfo.IfIndex INNER JOIN
dbo.tblAssets ON dbo.tblAssetMacAddress.AssetID = dbo.tblAssets.AssetID INNER JOIN
dbo.tblAssets AS tblAssets_1 ON dbo.tblSNMPInfo.AssetID = tblAssets_1.AssetID LEFT OUTER JOIN
dbo.tblADComputers ON dbo.tblAssets.AssetID = dbo.tblADComputers.AssetID
ORDER BY Switch, dbo.tblSNMPInfo.IfIndex
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now