05-29-2014 12:11 PM
Solved! Go to Solution.
05-29-2014 08:00 PM
SELECT Top 1000000
tblAssetGroups.AssetGroup,
Case tblSoftwareUni.Approved
When 0 Then 'neutral'
When 1 Then 'Approved'
When 2 Then 'Unapproved'
Else '(undefined)'
End AS Approval,
tblSoftwareUni.softwareName,
tblSoftwareUni.SoftwarePublisher,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username,
tsysAssetTypes.AssetTypeIcon10 AS icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried
FROM
tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.softID
INNER JOIN tblAssets ON tblAssets.AssetID = tblSoftware.AssetID
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblAssetGroupLink ON tblAssets.AssetID = tblAssetGroupLink.AssetID
INNER JOIN tblAssetGroups ON tblAssetGroups.AssetGroupID = tblAssetGroupLink.AssetGroupID
WHERE
tblAssetGroups.AssetGroup = 'Komputery'
AND tblAssetCustom.State = 1
AND (tblSoftwareUni.Approved = 0 OR tblSoftwareUni.Approved = 2)
ORDER BY
Approval,
tblSoftwareUni.softwareName,
tblAssets.AssetName
05-29-2014 08:00 PM
SELECT Top 1000000
tblAssetGroups.AssetGroup,
Case tblSoftwareUni.Approved
When 0 Then 'neutral'
When 1 Then 'Approved'
When 2 Then 'Unapproved'
Else '(undefined)'
End AS Approval,
tblSoftwareUni.softwareName,
tblSoftwareUni.SoftwarePublisher,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username,
tsysAssetTypes.AssetTypeIcon10 AS icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried
FROM
tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.softID
INNER JOIN tblAssets ON tblAssets.AssetID = tblSoftware.AssetID
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblAssetGroupLink ON tblAssets.AssetID = tblAssetGroupLink.AssetID
INNER JOIN tblAssetGroups ON tblAssetGroups.AssetGroupID = tblAssetGroupLink.AssetGroupID
WHERE
tblAssetGroups.AssetGroup = 'Komputery'
AND tblAssetCustom.State = 1
AND (tblSoftwareUni.Approved = 0 OR tblSoftwareUni.Approved = 2)
ORDER BY
Approval,
tblSoftwareUni.softwareName,
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now