→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !
02-16-2024 03:26 PM - edited 02-16-2024 03:27 PM
I am trying to create a report that shows systems that have an application installed "x" and when installed the version is not "y" or "z". I have several of these type reports that work fine when I am only looking at one version. With the version being a string and not a number I can't use greater than to evaluate. Below is what I have but it returns no systems, and I am 100% sure there are systems that don't have either version of the application installed. Does anyone know how to make this work, assuming it is even possible?
Thank you very much.
From tblAssets
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblSoftwareUni.softwareName Like 'x' And
tblSoftware.softwareVersion Not Like 'y%' And
tblSoftware.softwareVersion Not Like 'z%' And tblAssetCustom.State = 1
02-19-2024 07:12 PM
Was that meant to be a useful solution suggestion?
02-20-2024 05:19 AM - edited 02-20-2024 04:41 PM
Complex code:
Select Top 1000000 tblassets.AssetID,
tblassets.AssetName,
tblassets.IPAddress,
tblassets.Lastseen,
tblassets.Lasttried,
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion
From tblassets
Inner Join tblSoftware On tblassets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID And
tblSoftwareUni.softwareName Like '%finereader%'
Where tblassets.AssetID Not In (Select Top 1000000 tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID And
tblSoftwareUni.softwareName Like '%finereader%'
Where (tblSoftware.softwareVersion Like '9.%' Or
tblSoftware.softwareVersion Like '11.%') )
02-20-2024 02:12 PM
First, I like to say that I don't appreciate the unprofessional and condescending messages. If helping me without insulting me is impossible, please feel free to stop helping.
As for your "complex code..." It still returns no results.
02-21-2024 10:57 AM
Hello @arch
Sorry to hear about your experience with responses on this thread.
We edited out the original comment, I also see that you have responded directly. You can also use the 'report inappropriate content' button link so that staff can take a look and take appropriate action in relevant posts.
-Mercedes
02-20-2024 04:27 PM - edited 02-21-2024 05:14 AM
Ok. No problem. Sorry if I offended you.
I am not supporter and will stop helping you since this post.
Also I will check complex query may be I have posted corrupted version.
Update: Complex SQL query works without errors and I have result as in description.
02-20-2024 05:14 AM - edited 02-21-2024 11:11 AM
Simple code but exсlude only concrete versions:
Select Top 1000000 tblassets.AssetID,
tblassets.AssetName,
tblassets.IPAddress,
tblassets.Lastseen,
tblassets.Lasttried,
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion
From tblassets
Inner Join tblSoftware On tblassets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblSoftwareUni.softwareName Like '%finereader%' And
Not (tblSoftware.softwareVersion In ('12.1.439', '12.1.531'))
02-17-2024 09:49 PM
Can you please provide the actual X and Y please? It will help determine the conversions needed.
02-19-2024 05:50 PM
The version values that I am trying to user are "22.5.*" and "22.6.*"
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now