‎12-11-2015 10:24 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblSoftwareUni.softwareName,
tblSoftwareUni.SoftwarePublisher,
tblSoftware.softwareVersion,
tblAssets.AssetName
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
Where tblSoftwareUni.softwareName Like '%Adobe Flash Player 19 NPAPI%'
And tblSoftware.softwareVersion Not Like '%20.0.0.235%' And
tblAssetCustom.State = 1
Order By tblAssets.AssetName
Solved! Go to Solution.
‎12-11-2015 11:03 PM
CharIndex('.', s.softwareVersion) AS dot1,
CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1) AS dot2,
CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1)+1) AS dot3,
Cast(Left(s.softwareVersion, CharIndex('.', s.softwareVersion) - 1) As BigInt) AS ver_1,
Cast(Substring(s.softwareVersion,
CharIndex('.', s.softwareVersion) + 1,
CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1) - CharIndex('.', s.softwareVersion) -1) AS BigInt) AS ver_2,
Cast(Substring(s.softwareVersion,
CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1)+1,
CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1)+1) - CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1) -1) AS BigInt) AS ver_3,
Cast(Right(s.softwareVersion, Len(s.softwareVersion) - CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1)+1)) AS BigInt) AS ver_4
‎12-16-2015 10:17 PM
‎12-14-2015 06:20 PM
‎12-14-2015 05:31 PM
WHERE
...
AND Cast(Left(s.softwareVersion, CharIndex('.', s.softwareVersion) - 1) As BigInt) < 20
‎12-14-2015 02:08 PM
‎12-11-2015 11:03 PM
CharIndex('.', s.softwareVersion) AS dot1,
CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1) AS dot2,
CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1)+1) AS dot3,
Cast(Left(s.softwareVersion, CharIndex('.', s.softwareVersion) - 1) As BigInt) AS ver_1,
Cast(Substring(s.softwareVersion,
CharIndex('.', s.softwareVersion) + 1,
CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1) - CharIndex('.', s.softwareVersion) -1) AS BigInt) AS ver_2,
Cast(Substring(s.softwareVersion,
CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1)+1,
CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1)+1) - CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1) -1) AS BigInt) AS ver_3,
Cast(Right(s.softwareVersion, Len(s.softwareVersion) - CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion, CharIndex('.', s.softwareVersion)+1)+1)) AS BigInt) AS ver_4
‎12-12-2015 01:40 PM
RC62N wrote:
The version "number" is stored as a string, so trying to do comparisons as if it were a number is of limited use.
From my network's inventory, Adobe Flash Player's version info appears to be consistently recorded as 'a.b.c.d'. As long as that doesn't change, you can slice that up, convert the component pieces to integers and then do your comparisons against that.
sullivane wrote:
This report gives me all the computers with Flash player that is a certain version. How can I modify it so that it's a equal to or less than that version?
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
tblSoftwareUni.SoftwarePublisher As Publisher
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblAssets.AssetID Not In (Select Top 1000000 tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID
Where tblSoftwareUni.softwareName Like '%your software name %' And
tblSoftware.softwareVersion In ('compliant software version 1 ', 'compliant software version 2 ', 'compliant software version 3 ')) And
tblSoftwareUni.softwareName Like '%your software name %' And tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now