→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !
05-07-2024 10:20 PM
Great Afternoon ! How are you ? Great I hope !
i am trying to run a report that list computer assets that DO NOT COTAIN the folder\file noted in the tblFileVersions.FilePathfull Like statement. I used the ='False' argument however the reports shows computers that have the folder. Please see the query below and advise.
Thanks and have a great week !
Tony
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
tsysOS.OSname,
tsysOS.Image As icon,
tblAssets.Domain,
tblAssets.Username,
tblAssetCustom.State,
tblAssets.AssetUnique,
tblAssets.LocationID,
tblAssetCustom.Location
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblSystemEnclosure On tblSystemEnclosure.AssetID =
tblAssets.AssetID
Inner Join TsysChassisTypes On TsysChassisTypes.Chassistype =
tblSystemEnclosure.ChassisTypes
Where (tblAssets.AssetID Not In (Select tblFileVersions.AssetID
From tblFileVersions
Where
tblFileVersions.FilePathfull Like
'C:\Tech\Secure_Client51242_Azure\cisco-secure-client-win-5.1.2.42-core-vpn-predeploy-k9.msi' And tblFileVersions.Found = 'False') And tsysOS.OSname = 'win 10') Or
(tsysOS.OSname = 'win 11' And tblAssetCustom.State = 1 And
(TsysChassisTypes.ChassisName = 'Laptop' Or TsysChassisTypes.ChassisName =
'Desktop'))
Order By tblAssets.AssetUnique
05-07-2024 11:35 PM
the database documentation states the tblFileVersions.Found to be a bit. Have you tried to use 0 instead of False?
05-10-2024 06:44 PM
Great Morning ErikT, How are you ? Great I hope ! Thanks
you for the quick reply and that wonderful yet simple summation.
I tried adding 0 with and without ' ' however still got the same amount in results and verified that the folder "does" exist on the reported computer.
So I am wondering if the query has some other conflicting argument or statement.
Please advise and have a great rest of the week Sir !
Tony
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now