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