cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
abolus
Engaged Sweeper
hi can you please help me. i a m trying to extract a report from lan sweeper that will give me a PC name and a Mac Address of the PC but when i open the database it gives me a different MAC address. see attached file.

you can see it on the highlighted part of the query. it is giving different mac. but the PC did not change since before.

correct pc mac is 70:f3:95:0d:66:61

other mac address i do not know where it came from?... we did not change the anything on the PC. please advise
6 REPLIES 6
abolus
Engaged Sweeper
ok thanks it works
Hemoco
Lansweeper Alumni
Filter on field "ipenabled"

Select Top 1000000 dbo.tblComputers.Computername, tblNetwork.IPEnabled,
tblNetwork.Description, tblNetwork.MACaddress
From dbo.tblComputers Inner Join
tblNetwork On dbo.tblComputers.Computername = tblNetwork.Computername
Where tblNetwork.IPEnabled = 1
abolus
Engaged Sweeper
how can i get the correct mac address that is shown in the web console? i need to generate a report.

cpmputer name is 12827
correct mac is 70:f3:95:0d:66:61
Hemoco
Lansweeper Alumni
your query is correct but it shows the mac addresses for all network cards in the computer (physical or virtual)
abolus
Engaged Sweeper

simply just this one.
-----------
SELECT Computername, MACaddress, Lastchanged, NetworkID
FROM tblNetwork
order by Computername
-------------------


if i want to get the maxrecord for networkid so that i can get the latest mac here is the sql
-----------------
SELECT tblComputers.FQDN, a.Computername, a.MACaddress, a.Lastchanged, a.NetworkID
FROM tblNetwork AS a INNER JOIN
tblComputers ON a.Computername = tblComputers.Computername
WHERE (a.NetworkID =
(SELECT MAX(NetworkID) AS Expr1
FROM tblNetwork AS b
WHERE (a.Computername = Computername)))
ORDER BY a.Computername
------------------
Hemoco
Lansweeper Alumni
Can you also post the sql of this query please.