cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ma-soares
Engaged Sweeper
Olá!

I'm testing the Lansweeper product to use on my internal network. So far so good.

I'm looking at the report part and I'm trying to build a new report to find how old the computer is based on the Bios released date.

I want to use tblComputers.ComputerUnique, tblBIOS.ReleaseDate, tblAdusers.Company and tblADusers.name

To show something like

ComputerName BiosData UserofComputer UserCompany

Can anyone help me ? Thanks.

Miguel Ângelo Saragoça Soares
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
try this:

Select tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, tblBIOS.Caption, tblBIOS.ReleaseDate, tblADusers.Name,
tblADusers.Company
From tblComputers Inner Join
tblBIOS On tblComputers.Computername = tblBIOS.Computername Left Join
tblADusers On tblADusers.Username = tblComputers.Username And
tblADusers.Userdomain = tblComputers.Userdomain

View solution in original post

4 REPLIES 4
Hemoco
Lansweeper Alumni
Select tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, tblBIOS.Caption, tblBIOS.ReleaseDate, tblADusers.Name,
tblADusers.Company, DateDiff(yy, tblBIOS.ReleaseDate, GetDate()) As Age
From tblComputers Inner Join
tblBIOS On tblComputers.Computername = tblBIOS.Computername Left Join
tblADusers On tblADusers.Username = tblComputers.Username And
tblADusers.Userdomain = tblComputers.Userdomain
tdewar1
Engaged Sweeper
I like this query, but my SQL skills are not so good and I have had trouble figuring out, although I am sure it should be simple, how to add a calculated date to this to get a column showing the age of the computer calculated from the time between the bios release date and today.
ma-soares
Engaged Sweeper
It worked perfecly many thanks for the uber fast answer and working query.
Hemoco
Lansweeper Alumni
try this:

Select tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, tblBIOS.Caption, tblBIOS.ReleaseDate, tblADusers.Name,
tblADusers.Company
From tblComputers Inner Join
tblBIOS On tblComputers.Computername = tblBIOS.Computername Left Join
tblADusers On tblADusers.Username = tblComputers.Username And
tblADusers.Userdomain = tblComputers.Userdomain