cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Galadan
Engaged Sweeper
Hello, I have two domain in Lansweeper and I tried to make a report to select Microsoft Office product but for one single domain.

Here is my report:

Select Top 1000000 tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
Count(tblSoftware.SoftwareID) As Total
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Where tblAssetCustom.State = 1 And tblSoftwareUni.softwareName Not Like '%365%'
And tblSoftwareUni.softwareName Like 'Microsoft Office%' And
tblSoftwareUni.softwareName Not Like '%viewer%' And
tblSoftwareUni.softwareName Not Like '%runtime%' And
tblSoftwareUni.softwareName Not Like '%visio%' And
tblSoftwareUni.softwareName Not Like '%proofing%' And
tblSoftwareUni.softwareName Not Like '%analyzer%' And
tblSoftwareUni.softwareName Not Like '%resource%'
Group By tblSoftwareUni.softwareName,
tblSoftware.softwareVersion
Order By Total Desc,
Version Desc


Thanks for your help.

P.S: Sorry for my approximate English 🙂
1 ACCEPTED SOLUTION
Jeremy_D
Champion Sweeper
I pasted an updated version of your query below that will get you the information you require. All you need to do is replace '%domainName%' by your real (NetBIOS) domain name and it will do the trick.
Select Top 1000000 tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
Count(tblSoftware.SoftwareID) As Total,
tblAssets.Domain
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Where tblAssetCustom.State = 1 And tblSoftwareUni.softwareName Not Like '%365%'
And tblSoftwareUni.softwareName Like 'Microsoft Office%' And
tblSoftwareUni.softwareName Not Like '%viewer%' And
tblSoftwareUni.softwareName Not Like '%runtime%' And
tblSoftwareUni.softwareName Not Like '%visio%' And
tblSoftwareUni.softwareName Not Like '%proofing%' And
tblSoftwareUni.softwareName Not Like '%analyzer%' And
tblSoftwareUni.softwareName Not Like '%resource%' And
tblAssets.Domain Like '%domainName%'
Group By tblSoftwareUni.softwareName,
tblSoftware.softwareVersion,
tblAssets.Domain
Order By Total Desc,
Version Desc

View solution in original post

1 REPLY 1
Jeremy_D
Champion Sweeper
I pasted an updated version of your query below that will get you the information you require. All you need to do is replace '%domainName%' by your real (NetBIOS) domain name and it will do the trick.
Select Top 1000000 tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
Count(tblSoftware.SoftwareID) As Total,
tblAssets.Domain
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Where tblAssetCustom.State = 1 And tblSoftwareUni.softwareName Not Like '%365%'
And tblSoftwareUni.softwareName Like 'Microsoft Office%' And
tblSoftwareUni.softwareName Not Like '%viewer%' And
tblSoftwareUni.softwareName Not Like '%runtime%' And
tblSoftwareUni.softwareName Not Like '%visio%' And
tblSoftwareUni.softwareName Not Like '%proofing%' And
tblSoftwareUni.softwareName Not Like '%analyzer%' And
tblSoftwareUni.softwareName Not Like '%resource%' And
tblAssets.Domain Like '%domainName%'
Group By tblSoftwareUni.softwareName,
tblSoftware.softwareVersion,
tblAssets.Domain
Order By Total Desc,
Version Desc