‎10-05-2013 01:00 AM
Solved! Go to Solution.
‎10-05-2013 03:00 AM
SELECT
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
...
tSysChassisTypes.ChassisName
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
...
INNER JOIN tblSystemEnclosure ON tblAssets.AssetID = tblSystemEnclosure.AssetID
INNER JOIN TsysChassisTypes ON tblSystemEnclosure.ChassisTypes = TsysChassisTypes.Chassistype
WHERE
tblAssetCustom.State = 1
AND tSysChassisTypes.ChassisName IN ('laptop', 'notebook', 'portable')
SELECT
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
...
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
...
INNER JOIN tblPortableBattery ON tblAssets.AssetID = tblPortableBattery.AssetID
WHERE
tblAssetCustom.State = 1
SELECT Top 1000000
tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Lastseen,
tblADusers.Name,
tblADusers.Department,
tblAssets.Description
FROM
tblAssets
Inner Join tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblADusers ON tblAssets.Username = tblADusers.Username
Inner Join tblPortableBattery ON tblAssets.AssetID = tblPortableBattery.AssetID
WHERE
NOT EXISTS (SELECT Top 1
tblSoftware.AssetID
FROM
tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.SoftID
WHERE
tblSoftware.AssetID = tblAssets.AssetID
AND tblSoftwareUni.softwareName LIKE '%Pointsec PC%'
)
ORDER BY tblAssets.AssetUnique
‎10-05-2013 03:00 AM
SELECT
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
...
tSysChassisTypes.ChassisName
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
...
INNER JOIN tblSystemEnclosure ON tblAssets.AssetID = tblSystemEnclosure.AssetID
INNER JOIN TsysChassisTypes ON tblSystemEnclosure.ChassisTypes = TsysChassisTypes.Chassistype
WHERE
tblAssetCustom.State = 1
AND tSysChassisTypes.ChassisName IN ('laptop', 'notebook', 'portable')
SELECT
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
...
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
...
INNER JOIN tblPortableBattery ON tblAssets.AssetID = tblPortableBattery.AssetID
WHERE
tblAssetCustom.State = 1
SELECT Top 1000000
tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Lastseen,
tblADusers.Name,
tblADusers.Department,
tblAssets.Description
FROM
tblAssets
Inner Join tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblADusers ON tblAssets.Username = tblADusers.Username
Inner Join tblPortableBattery ON tblAssets.AssetID = tblPortableBattery.AssetID
WHERE
NOT EXISTS (SELECT Top 1
tblSoftware.AssetID
FROM
tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.SoftID
WHERE
tblSoftware.AssetID = tblAssets.AssetID
AND tblSoftwareUni.softwareName LIKE '%Pointsec PC%'
)
ORDER BY tblAssets.AssetUnique
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now