There are often many ways of phrasing your query, so if what you've got works, good on ya. Personally, I would have set up the JOINs a little differently that you.
You've set up to match against the software name but select any recorded version, then you're filtering for only the versions you want in the main SELECT. Since you're after specific versions, I would have included those in the sub-SELECTS that you're JOINing against.
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Left Join (Select tblSoftware.AssetID,
tblSoftwareUni.SoftwarePublisher,
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblSoftwareUni.softwareName Like '%SAP Interactive Excel%'
And tblSoftware.softwareVersion = '3.0.8.20036'
) As s1 On s1.AssetID = tblassets.AssetID
Left Join (Select tblSoftware.AssetID,
tblSoftwareUni.SoftwarePublisher,
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblSoftwareUni.softwareName Like '%SAP Business Explorer%'
And tblSoftware.softwareVersion = '7.60'
) As s2 On s2.AssetID = tblassets.AssetID
Left Join (Select tblSoftware.AssetID,
tblSoftwareUni.SoftwarePublisher,
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where
tblSoftwareUni.softwareName Like '%SAP GUI for Windows 7.60 (Patch 5)%'
And tblSoftware.softwareVersion = '7.60 Compilation 1'
) As s3 On s3.AssetID = tblassets.AssetID
Left Join (Select tblSoftware.AssetID,
tblSoftwareUni.SoftwarePublisher,
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblSoftwareUni.softwareName Like '%SAP Business Client 7.0%'
And tblSoftware.softwareVersion = '7.0 PL10'
) As s4 On s4.AssetID = tblassets.AssetID
Inner Join lansweeperdb.dbo.tsysOS On tsysOS.OScode = tblassets.OScode
Where
tblassetcustom.State = 1
Order By
tblassets.AssetName
Among other things, that simplifies your new request. For each JOINed sub-SELECT, if there's a match for the software
and version, then there is an AssetID returned. If there is no match, NULL is returned. You can use this in your WHERE clause:
Where
tblassetcustom.State = 1
AND s1.AssetID IS NOT NULL -- match found
AND s2.AssetID IS NOT NULL -- match found
AND s3.AssetID IS NOT NULL -- match found
AND s4.AssetID IS NULL -- no match