‎11-02-2018 03:45 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion,
tsysIPLocations.IPLocation
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Where tblSoftwareUni.softwareName Like '%java 7%' And
tblSoftwareUni.softwareName Like '%java 8%' And tblAssetCustom.State = 1
‎11-02-2018 04:04 PM
Where tblSoftwareUni.softwareName Like '%java 7%' Andyou're saying "if the current record is both Java 7 and Java 8 then...".
tblSoftwareUni.softwareName Like '%java 8%'
‎11-06-2018 10:30 PM
RC62N wrote:
The problem you're running into is down to the phrasing of your condition. The contents of your WHERE clause is evaluated for each software name. When you sayWhere tblSoftwareUni.softwareName Like '%java 7%' Andyou're saying "if the current record is both Java 7 and Java 8 then...".
tblSoftwareUni.softwareName Like '%java 8%'
Take a look at this thread. Depending on how you want to report the results, this thread might be useful, too.
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now