cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
arch
Engaged Sweeper

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

17 REPLIES 17
arch
Engaged Sweeper

Was that meant to be a useful solution suggestion?

Mister_Nobody
Honored Sweeper II

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.%') )

 

 

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. 

Mercedes_O
Community Manager
Community Manager

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

Mister_Nobody
Honored Sweeper II

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.

Mister_Nobody
Honored Sweeper II

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'))

 

 

rom
Champion Sweeper III

Can you please provide the actual X and Y please?  It will help determine the conversions needed.

arch
Engaged Sweeper

The version values that I am trying to user are "22.5.*" and "22.6.*"