‎08-24-2017 09:22 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
tsysOS.OSname,
tsysOS.Image As icon
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblAssets.AssetID Not In (Select tblFileVersions.AssetID
From tblFileVersions
Where
tblFileVersions.FilePathfull Like
'C:\ProgramData\Progammy\File.dll' And
tblFileVersions.Found = 'False') And tblAssetCustom.State = 1
Order By tblAssets.AssetName
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblSoftwareUni.softwareName As software,
tblSoftware.softwareVersion As version,
tblSoftwareUni.SoftwarePublisher As publisher,
tsysOS.Image As icon
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
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblSoftwareUni.softwareName Like 'programmy' And
tblAssetCustom.State = 1
Order By tblAssets.AssetName,
software,
version
Solved! Go to Solution.
‎08-25-2017 05:10 PM
SELECT Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion,
tblFileVersions.FilePathfull,
CASE tblFileVersions.Found
WHEN 0 THEN 'Absent'
WHEN 1 THEN 'Present'
ELSE 'Undefined'
END As FileFound
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
LEFT JOIN tblFileVersions On tblAssets.AssetID = tblFileVersions.AssetID
WHERE
tblAssetCustom.State = 1
AND tblSoftwareUni.softwareName Like '%programmy%'
AND tblFileVersions.FilePathfull = 'C:\ProgramData\Progammy\File.dll'
‎08-29-2017 09:25 AM
‎08-25-2017 05:10 PM
SELECT Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion,
tblFileVersions.FilePathfull,
CASE tblFileVersions.Found
WHEN 0 THEN 'Absent'
WHEN 1 THEN 'Present'
ELSE 'Undefined'
END As FileFound
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
LEFT JOIN tblFileVersions On tblAssets.AssetID = tblFileVersions.AssetID
WHERE
tblAssetCustom.State = 1
AND tblSoftwareUni.softwareName Like '%programmy%'
AND tblFileVersions.FilePathfull = 'C:\ProgramData\Progammy\File.dll'
‎08-25-2017 05:08 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblSoftwareUni.softwareName As software,
tblSoftware.softwareVersion As version,
tblSoftwareUni.SoftwarePublisher As publisher,
tsysOS.Image As icon
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
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblAssets.AssetID Not In (Select tblFileVersions.AssetID
From tblFileVersions
Where tblFileVersions.FilePathfull Like 'C:\ProgramData\Progammy\File.dll' And
tblFileVersions.Found = 'True') And tblSoftwareUni.softwareName Like
'programmy' And tblAssetCustom.State = 1
Order By tblAssets.AssetName,
software,
version
‎08-25-2017 03:10 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now