cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Cobra7
Champion Sweeper
Here goes,

I'm trying to make a report, I import tblComputers, tblSoftware and tblRegistiry. I got the conditions correct and ran it, and it showed every computer three times. I opened up the tblRegistry and noticed most computers are listed three times (3 reg keys each)

Essentially I'm trying to make a list of computers, that have office 2003 and do not have a registry key. I have been able to make a script of computers that have the software and the key and that works just fine. I need a report that shows the computers that have the software and not the key.

After talking to my SQL expert, she said it had something to do with how Report builder links the tables (computername). She gave it a few minutes and typed in some SQL but the report builder didn't like it. Any suggestions? I thought this would be a quick and easy report, but I guessed wrong.

The code may help:

SELECT
tblComputers.Computername,
tblComputers.Username,
tblSoftware.softwareName
FROM
tblRegistry
LEFT OUTER JOIN tblComputers ON (tblRegistry.Computername = tblComputers.Computername)
INNER JOIN tblSoftware ON (tblComputers.Computername = tblSoftware.ComputerName)
WHERE
tblSoftware.softwareName LIKE '%microsoft office 2003%' AND
tblRegistry.Value NOT LIKE '%KB956328%'
1 REPLY 1
Hemoco
Lansweeper Alumni
not checked for syntax errors:

SELECT Computername FROM tblcomputers where computername in (select computername from tblsoftware where softwareName LIKE '%microsoft office 2003%') and computername not in (select computername from tblregistry where Value LIKE '%KB956328%')

New to Lansweeper?

Try Lansweeper For Free

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

Try Now