cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tspencer
Engaged Sweeper
We want a report of computers that have both 'Application-A' and 'Application-B' installed on them. What would the query look like?

Thanks!


1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
Please try the report below. Replace "ApplicationA" and "ApplicationB" with the software packages you would like to report on.

Select Distinct tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, tblComputers.Firstseen, tblComputers.Lastseen,
tblComputers.LastknownIP
From tblComputers
Where tblComputers.Computername In (Select tblSoftware.ComputerName
From tblSoftware
Where tblSoftware.softwareName Like '%ApplicationA%') And
tblComputers.Computername In (Select tblSoftware.ComputerName From tblSoftware
Where tblSoftware.softwareName Like '%ApplicationB%')
Order By tblComputers.ComputerUnique


To use the specified report, do the following:
• Open the Lansweeper configuration console and select Reports & Alerts\Report Builder. Hit the “New” button.
• Copy the SQL code provided and paste it at the bottom of the newly created report, replacing the default SQL code.
• Click somewhere near tblComputers so the new code applies.
• Give the report a “View name” and a “Report name” and hit the “Save” button.
• Double-click on the report in the report list to see its results and export options.

View solution in original post

2 REPLIES 2
tspencer
Engaged Sweeper
Awesome! That was what we were looking for. Thanks!
Hemoco
Lansweeper Alumni
Please try the report below. Replace "ApplicationA" and "ApplicationB" with the software packages you would like to report on.

Select Distinct tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, tblComputers.Firstseen, tblComputers.Lastseen,
tblComputers.LastknownIP
From tblComputers
Where tblComputers.Computername In (Select tblSoftware.ComputerName
From tblSoftware
Where tblSoftware.softwareName Like '%ApplicationA%') And
tblComputers.Computername In (Select tblSoftware.ComputerName From tblSoftware
Where tblSoftware.softwareName Like '%ApplicationB%')
Order By tblComputers.ComputerUnique


To use the specified report, do the following:
• Open the Lansweeper configuration console and select Reports & Alerts\Report Builder. Hit the “New” button.
• Copy the SQL code provided and paste it at the bottom of the newly created report, replacing the default SQL code.
• Click somewhere near tblComputers so the new code applies.
• Give the report a “View name” and a “Report name” and hit the “Save” button.
• Double-click on the report in the report list to see its results and export options.