‎08-04-2016 01:58 PM
Select Top 100 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblAssets.AssetID Not In (Select Top 100 tblRegistry.AssetID
From tblRegistry
Where tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\MATRIX42\DHCPOptions')
And tblAssetCustom.State = 1
Order By tblAssets.AssetName
Solved! Go to Solution.
‎08-16-2016 10:35 PM
Select Top 100000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblAssets.AssetID In (Select Top 100000 tblRegistry.AssetID
From tblRegistry
Where tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\MATRIX42\EmpInventory'
And tblRegistry.Valuename = 'LastDomain') And
tblAssets.AssetID Not In (Select Top 100000 tblRegistry.AssetID
From tblRegistry
Where tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\MATRIX42\DHCPOptions'
And tblRegistry.Valuename = 'Template') And tblAssetCustom.State = 1
Order By tblAssets.AssetName
‎08-16-2016 10:35 PM
Select Top 100000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblAssets.AssetID In (Select Top 100000 tblRegistry.AssetID
From tblRegistry
Where tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\MATRIX42\EmpInventory'
And tblRegistry.Valuename = 'LastDomain') And
tblAssets.AssetID Not In (Select Top 100000 tblRegistry.AssetID
From tblRegistry
Where tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\MATRIX42\DHCPOptions'
And tblRegistry.Valuename = 'Template') And tblAssetCustom.State = 1
Order By tblAssets.AssetName
‎08-15-2016 02:09 PM
‎08-12-2016 09:36 PM
‎08-09-2016 02:46 PM
‎08-05-2016 08:22 PM
Select Top 100 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblAssets.AssetID Not In (Select Top 100 tblRegistry.AssetID
From tblRegistry
Where tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\MATRIX42\DHCPOptions')
And tblAssets.AssetID In (Select Top 100 tblRegistry.AssetID
From tblRegistry
Where tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\MATRIX42')
And tblAssetCustom.State = 1
Order By tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now