→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jantjeb
Engaged Sweeper
i'm trying to create a query that shows me all the computers that does not have a software package installed. but i get the following error:

Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression

the query look as followed

Select tblComputers.Computer
From tblComputers
Where tblComputers.Computer != (Select tblComputers.Computer
From tblComputers Inner Join tblsoftware On tblsoftware.ComputerName =
tblComputers.Computername
Where tblsoftware.softwareName = 'Software package that needs to be checked')


the sub query runs fine and gives all the pc's that have the software installed.
i now need a revered list with all the other computers.

the errors message is logical because i get a list. but i'm not sure how to do it else.
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
try this

Select tblComputers.Computer
From tblComputers
Where tblComputers.Computer Not In (Select ComputerName
From tblsoftware
Where softwareName = 'Software package that needs to be checked')

View solution in original post

4 REPLIES 4
robintre
Engaged Sweeper II
This code is what i was looking for.

But I wonder if it's possible to have only one report where I could enter the software name as a parameter when I run it. This would avoid making a lot of reports.

Or even better, directly in the software overview, is it possible to view the computers where the software is not installed?

Hemoco
Lansweeper Alumni
robintre wrote:
But I wonder if it's possible to have only one report where I could enter the software name as a parameter when I run it. This would avoid making a lot of reports.


This is only possible in the configuration console. You can change the software criteria and instantly rerun the report. You cannot currently do this from the web console.

robintre wrote:
Or even better, directly in the software overview, is it possible to view the computers where the software is not installed?


No, this is not currently possible. Clicking on links in the software overview on the website will only show computers that do have the software installed, not ones that don't.
jantjeb
Engaged Sweeper
thanks that helped alot

this is what i needed:


Select tblComputers.Computer
From tblComputers
Where tblComputers.Computer Not In (Select tblComputers.Computer
From tblComputers Inner Join tblsoftware On tblsoftware.ComputerName =
tblComputers.Computername
Where tblsoftware.softwareName = 'Software package that needs to be checked')
Hemoco
Lansweeper Alumni
try this

Select tblComputers.Computer
From tblComputers
Where tblComputers.Computer Not In (Select ComputerName
From tblsoftware
Where softwareName = 'Software package that needs to be checked')