→ 🚀Are you a Lansweeper Champion?! Join our Contributor Program Sign up here!

Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
itkai
Engaged Sweeper
I need to generate an SQL View that contains the following information from the lansweeper database, and I'm hoping that someone who know's the database map better than I do can help.

I need to be able to grab:

Vendor
Model
OS Caption
Identifying Number/Service Tag
MAC Address of the primary network adapter
Last Logged on user

If anyone can be of assistance it would be very helpful.

Thanks,
GaryO
2 REPLIES 2
itkai
Engaged Sweeper
Awesome! Thanks!
Hemoco
Lansweeper Alumni
Please try the following query:

Select Top 1000000 tblComputers.Computername, tblComputers.ComputerUnique, tblComputers.Domain, tblComputerSystemProduct.Vendor, tblComputerSystemProduct.Name, tblOperatingsystem.Caption, tblComputerSystemProduct.IdentifyingNumber, tblNetwork.Description As [Network Card], tblNetwork.IPAddress, tblNetwork.MACaddress, tblCPlogoninfo.Username As [Last Logged On], Max(tblCPlogoninfo.logontime) As [Last Logon Date] From tblComputers Inner Join tblNetwork On tblComputers.Computername = tblNetwork.Computername Left Join tblOperatingsystem On tblComputers.Computername = tblOperatingsystem.Computername Left Join tblComputerSystemProduct On tblComputers.Computername = tblComputerSystemProduct.Computername Left Join tblCPlogoninfo On tblComputers.Computername = tblCPlogoninfo.Computername Inner Join web40ActiveComputers On web40ActiveComputers.Computername = tblComputers.Computername Group By tblComputers.Computername, tblComputers.ComputerUnique, tblComputers.Domain, tblComputerSystemProduct.Vendor, tblComputerSystemProduct.Name, tblOperatingsystem.Caption, tblComputerSystemProduct.IdentifyingNumber, tblNetwork.Description, tblNetwork.IPAddress, tblNetwork.MACaddress, tblCPlogoninfo.Username, tblNetwork.IPEnabled Having tblNetwork.IPEnabled = '1'

Archive

This board contains archived posts from the retired Lansweeper Forum and Insiders Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now