This is what I have. It works except that since I added memory speed to the report it started listing each stick of ram. How can I get the report to just list one line for each computer.
Select Top 1000000 tsysOS.Image As Icon,
tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tsysOS.OSname,
Ceiling(tblPhysicalMemoryArray.MaxCapacity / 1024) As MaxCapacity,
tblAssets.Memory,
Cast(CorrectMemory.Used As numeric) As [Slots used],
tblPhysicalMemoryArray.MemoryDevices As [Slots available],
tblPhysicalMemoryArray.MemoryDevices - CorrectMemory.Used As [Slots free],
tblPhysicalMemory.Speed,
tblAssetCustom.Model
From tblAssets
Inner Join tblPhysicalMemoryArray On tblAssets.AssetID =
tblPhysicalMemoryArray.AssetID
Inner Join (Select tblAssets.AssetID,
Sum(Ceiling(tblPhysicalMemory.Capacity / 1024 / 1024)) As Memory,
Count(tblPhysicalMemory.Win32_PhysicalMemoryid) As Used
From tblAssets
Left Outer Join (TsysMemorytypes
Right Outer Join tblPhysicalMemory On TsysMemorytypes.Memorytype =
tblPhysicalMemory.MemoryType) On tblAssets.AssetID =
tblPhysicalMemory.AssetID
Group By tblAssets.AssetID,
tblPhysicalMemory.MemoryType
Having tblPhysicalMemory.MemoryType <> 11) CorrectMemory
On CorrectMemory.AssetID = tblAssets.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblPhysicalMemory On tblAssets.AssetID = tblPhysicalMemory.AssetID
Where tblPhysicalMemoryArray.[Use] = 3 And tblAssetCustom.State = 1
Order By [Slots free] Desc,
tblAssets.AssetName