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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sethm
Engaged Sweeper
I've created the following report that displays assets that contain the regkey 'HKEY_LOCAL_MACHINE\SOFTWARE\VDG'. How would I do the reverse and display systems that do not have that regkey?

Select Top 1000000 tblAssets.AssetID,
tblAssets.Username,
tblAssets.AssetName,
tblAssets.Domain,
tblRegistry.Valuename,
tblRegistry.Value,
tblRegistry.Lastchanged,
tblAssets.Lastseen,
tblRegistry.Regkey
From tblAssets
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Where tblRegistry.Regkey Like 'HKEY_LOCAL_MACHINE\SOFTWARE\VDG'
Order By tblAssets.AssetName
2 REPLIES 2
sethm
Engaged Sweeper
Currently have it as so and this is giving me 0 results.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblRegistry.Regkey
From tblAssets
Left Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Where tblAssets.AssetID != tblRegistry.AssetID And
tblRegistry.Regkey Not Like 'HKEY_LOCAL_MACHINE\SOFTWARE\VDG'
Order By tblAssets.AssetName
Esben_D
Lansweeper Employee
Lansweeper Employee
Try a left join on tblregistry and add a where condition where tblassets.assetid != tblregistry.assetid

New to Lansweeper?

Try Lansweeper For Free

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

Try Now