‎03-22-2017 08:11 PM
SELECT Top 1000000 tblAssets.AssetID,
tblAssets.AssetName AS Name,
tsysAssetTypes.AssetTypeIcon10 AS icon,
CASE tblAssets.LocationID
WHEN '1' THEN 'Location1'
WHEN '2' THEN 'Location2'
WHEN '3' THEN 'Location3'
ELSE 'Uknown'
END AS Location,
tsysAssetTypes.AssetTypename AS Type,
tblAssets.IPAddress AS [IP Addr],
tblAssetCustom.Manufacturer + ' ' + tblAssetCustom.Model AS [Make / Model],
tblAssets.Processor AS CPU,
CAST(ROUND(CAST(tblAssets.Memory AS FLOAT)/1024, 0) AS NVARCHAR) + ' GB' AS Memory,
CASE tblComputerSystem.SystemType
WHEN 'x64-based PC' THEN '64-bit'
WHEN 'X86-based PC' THEN '32-bit'
END AS Arch,
CONVERT (nvarchar(10), tblAssets.FirstSeen, 120) AS [First Seen]
FROM tblAssets
INNER JOIN tblComputersystem ON tblAssets.AssetID = tblComputersystem.AssetID
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
WHERE tblAssetCustom.State = 1
ORDER BY Location, Type, Name
Solved! Go to Solution.
‎03-24-2017 01:39 PM
SELECT Top 1000000 tblAssets.AssetID,
tblAssets.AssetName AS Name,
tsysAssetTypes.AssetTypeIcon10 AS icon,
CASE tblAssets.LocationID
WHEN '1' THEN 'Location1'
WHEN '2' THEN 'Location2'
WHEN '3' THEN 'Location3'
ELSE 'Uknown'
END AS Location,
tsysAssetTypes.AssetTypename AS Type,
tblAssets.IPAddress AS [IP Addr],
tblAssetCustom.Manufacturer + ' ' + tblAssetCustom.Model AS [Make / Model],
tblAssets.Processor AS CPU,
CAST(ROUND(CAST(tblAssets.Memory AS FLOAT)/1024, 0) AS NVARCHAR) + ' GB' AS Memory,
CASE tblComputerSystem.SystemType
WHEN 'x64-based PC' THEN '64-bit'
WHEN 'X86-based PC' THEN '32-bit'
END AS Arch,
CONVERT (nvarchar(10), tblAssets.FirstSeen, 120) AS [First Seen]
FROM tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
LEFT OUTER JOIN tblComputersystem ON tblAssets.AssetID = tblComputersystem.AssetID
WHERE tblAssetCustom.State = 1
ORDER BY Location, Type, Name
‎03-24-2017 01:39 PM
SELECT Top 1000000 tblAssets.AssetID,
tblAssets.AssetName AS Name,
tsysAssetTypes.AssetTypeIcon10 AS icon,
CASE tblAssets.LocationID
WHEN '1' THEN 'Location1'
WHEN '2' THEN 'Location2'
WHEN '3' THEN 'Location3'
ELSE 'Uknown'
END AS Location,
tsysAssetTypes.AssetTypename AS Type,
tblAssets.IPAddress AS [IP Addr],
tblAssetCustom.Manufacturer + ' ' + tblAssetCustom.Model AS [Make / Model],
tblAssets.Processor AS CPU,
CAST(ROUND(CAST(tblAssets.Memory AS FLOAT)/1024, 0) AS NVARCHAR) + ' GB' AS Memory,
CASE tblComputerSystem.SystemType
WHEN 'x64-based PC' THEN '64-bit'
WHEN 'X86-based PC' THEN '32-bit'
END AS Arch,
CONVERT (nvarchar(10), tblAssets.FirstSeen, 120) AS [First Seen]
FROM tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
LEFT OUTER JOIN tblComputersystem ON tblAssets.AssetID = tblComputersystem.AssetID
WHERE tblAssetCustom.State = 1
ORDER BY Location, Type, Name
‎03-23-2017 10:58 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now