‎07-29-2019 08:41 PM
‎07-30-2019 04:15 PM
Select Top 1000000
tblAssets.AssetID,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetName,
tblAssets.Username,
tblAssets.Domain,
tblAssets.IPAddress,
tblAssets.Memory,
tblPhysicalMemory.Speed,
Round(tblPhysicalMemory.Speed*8, -2) AS [PC-rating],
tblPhysicalMemory.Capacity,
tblPhysicalMemory.PartNumber,
tblPhysicalMemory.Manufacturer,
tblPhysicalMemory.DeviceLocator,
TsysMemorytypes.MemoryName,
CASE
WHEN TsysMemorytypes.MemoryName = 'Unknown'
-- NOT a definitive test for DDR4
-- just an illustration based solely on the memory speed
-- adjust the conditions if you can reliably derive the memory type from its other characteristics
AND tblPhysicalMemory.Speed IN (1600, 1866, 2133, 2400, 2666, 2933, 3200, 2800, 3000, 3300) THEN 'DDR4'
WHEN TsysMemorytypes.MemoryName LIKE 'DDR%' THEN TsysMemorytypes.MemoryName
ELSE 'unknown'
END AS MemType
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblPhysicalMemory On tblAssets.AssetID = tblPhysicalMemory.AssetID
Inner Join TsysMemorytypes ON tsysmemorytypes.Memorytype = tblPhysicalMemory.MemoryType
Where
CASE
WHEN TsysMemorytypes.MemoryName = 'Unknown'
-- NOT a definitive test for DDR4
-- just an illustration based solely on the memory speed
-- adjust the conditions if you can reliably derive the memory type from its other characteristics
AND tblPhysicalMemory.Speed IN (1600, 1866, 2133, 2400, 2666, 2933, 3200, 2800, 3000, 3300) THEN 'DDR4'
WHEN TsysMemorytypes.MemoryName LIKE 'DDR%' THEN TsysMemorytypes.MemoryName
ELSE 'unknown'
END LIKE 'DDR%'
‎07-29-2019 10:30 PM
SELECT *reveals that the last few known types are
FROM TsysMemorytypes
Memorytype MemoryName
20 DDR
21 DDR2
22 DDR2 FB-DIMM
23 DDR3
24 DDR3
25 FBD2
‎07-29-2019 10:15 PM
‎07-29-2019 10:13 PM
Value Meaning(I'm guessing that the FB-DIMM should be 23) it would seem that DDR4 falls in the "unknown" category. You might want to change your WHERE clause to
0 Unknown
1 Other
2 DRAM
3 Synchronous DRAM
4 Cache DRAM
5 EDO
6 EDRAM
7 VRAM
8 SRAM
9 RAM
10 ROM
11 Flash
12 EEPROM
13 FEPROM
14 EPROM
15 CDRAM
16 3DRAM
17 SDRAM
18 SGRAM
19 RDRAM
20 DDR
22 DDR2 FB-DIMM
24 DDR3
25 FBD2
Whereor
TsysMemorytypes.MemoryName LIKE 'DDR%' OR TsysMemorytypes.MemoryName = 'Unknown'
Where TsysMemorytypes.MemoryName IN ('ddr4', 'ddr3', 'ddr2', 'ddr', 'Unknown')
‎07-29-2019 09:58 PM
From tblAssetswith
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblPhysicalMemory On tblAssets.AssetID = tblPhysicalMemory.AssetID,
TsysMemorytypes
Where (TsysMemorytypes.MemoryName = 'ddr4'
Or TsysMemorytypes.MemoryName = 'ddr3'
Or TsysMemorytypes.MemoryName = 'ddr2'
Or TsysMemorytypes.MemoryName = 'ddr')
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblPhysicalMemory On tblAssets.AssetID = tblPhysicalMemory.AssetID
Inner Join TsysMemorytypes ON tsysmemorytypes.Memorytype = tblPhysicalMemory.MemoryType
Where
TsysMemorytypes.MemoryName LIKE 'DDR%'
PC4-21300 (2666MHz)
PC4-22400 (2800MHz)
PC4-19200 (2400MHz)
PC4-24000 (3000MHz)
PC4-17000 (2133MHz)
PC4-25600 (3200MHz)
PC4-26400 (3300MHz)
PC3-6400 (800MHz)
PC3-8500 (1066MHz)
PC3-10600 (1333MHz)
PC3-12800 (1600MHz)
Round(tblPhysicalMemory.Speed*8, -2)to your query.
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now