‎04-15-2015 09:29 PM
Solved! Go to Solution.
‎04-17-2015 11:41 AM
Select Top 1000000 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,
tsysOS.Image As icon
From tblAssets
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join (Select Top 1000000 tblSoftware.AssetID,
Max(Cast(Reverse(SubString(Reverse(tblSoftwareUni.softwareName), 1,
4)) As int)) As ShortVersion
From tblSoftware
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Where tblSoftwareUni.softwareName Like 'Microsoft Office%' And
tblSoftwareUni.softwareName Not Like '%viewer%' And
SubString(tblSoftwareUni.softwareName, Len(tblSoftwareUni.softwareName) - 4,
3) = ' 20'
Group By tblSoftware.AssetID) SubQuery1 On SubQuery1.AssetID =
tblSoftware.AssetID And
SubQuery1.ShortVersion =
Cast(Reverse(SubString(Reverse(tblSoftwareUni.softwareName), 1, 4)) As int)
Where tblSoftwareUni.softwareName Like 'Microsoft Office%' And
tblSoftwareUni.softwareName Not Like '%viewer%' And
SubString(tblSoftwareUni.softwareName, Len(tblSoftwareUni.softwareName) - 4,
3) = ' 20' And tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName,
Software
‎04-17-2015 05:59 PM
‎04-17-2015 04:09 PM
‎04-17-2015 11:41 AM
Select Top 1000000 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,
tsysOS.Image As icon
From tblAssets
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join (Select Top 1000000 tblSoftware.AssetID,
Max(Cast(Reverse(SubString(Reverse(tblSoftwareUni.softwareName), 1,
4)) As int)) As ShortVersion
From tblSoftware
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Where tblSoftwareUni.softwareName Like 'Microsoft Office%' And
tblSoftwareUni.softwareName Not Like '%viewer%' And
SubString(tblSoftwareUni.softwareName, Len(tblSoftwareUni.softwareName) - 4,
3) = ' 20'
Group By tblSoftware.AssetID) SubQuery1 On SubQuery1.AssetID =
tblSoftware.AssetID And
SubQuery1.ShortVersion =
Cast(Reverse(SubString(Reverse(tblSoftwareUni.softwareName), 1, 4)) As int)
Where tblSoftwareUni.softwareName Like 'Microsoft Office%' And
tblSoftwareUni.softwareName Not Like '%viewer%' And
SubString(tblSoftwareUni.softwareName, Len(tblSoftwareUni.softwareName) - 4,
3) = ' 20' And tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName,
Software
‎04-16-2015 04:17 PM
‎04-16-2015 12:33 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now