cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Sungink837
Engaged Sweeper
I am trying to upgrade RAM for desktops in a very mixed age environment that adhered to no life cycle for machines. I found a previous post for this, however I receive an error when attempting to run the report. Please help!

This is the query I found

Select Distinct Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Memory / 1024 As 'memory',
tblPhysicalMemory.Speed,
TsysMemorytypes.MemoryName
From tblAssets
Inner Join tblPhysicalMemory On tblAssets.AssetID = tblPhysicalMemory.AssetID
Inner Join TsysMemorytypes On tblPhysicalMemory.MemoryType =
TsysMemorytypes.Memorytype

This is the question where I found the query above

https://www.lansweeper.com/forum/yaf_postst5547_RAM-memory-modules-type.aspx#post24672

I've attached the error received when running the query. The version of lansweeper is 6.0.151.26
1 ACCEPTED SOLUTION
RCorbeil
Honored Sweeper II
Probably a limitation in Compact Edition.

I've not run into column labels being delimited with single-quotes before, but the query works on full-blown SQL Server.

Since the error message seems to be focused on 'memory' as the problem, why not remove the single-quotes?
tblAssets.Memory / 1024 As memory,
or
tblAssets.Memory / 1024 As [memory],
should work the way you're expecting.

View solution in original post

5 REPLIES 5
RCorbeil
Honored Sweeper II
Probably a limitation in Compact Edition.

I've not run into column labels being delimited with single-quotes before, but the query works on full-blown SQL Server.

Since the error message seems to be focused on 'memory' as the problem, why not remove the single-quotes?
tblAssets.Memory / 1024 As memory,
or
tblAssets.Memory / 1024 As [memory],
should work the way you're expecting.
RC62N wrote:
Probably a limitation in Compact Edition.

I've not run into column labels being delimited with single-quotes before, but the query works on full-blown SQL Server.

Since the error message seems to be focused on 'memory' as the problem, why not remove the single-quotes?
tblAssets.Memory / 1024 As memory,
or
tblAssets.Memory / 1024 As [memory],
should work the way you're expecting.


That worked! Thank you so much! That was driving me crazy!
Sungink837
Engaged Sweeper
I've also included a second snip it highlighting the code pasted into the query that results in error
Esben_D
Lansweeper Employee
Lansweeper Employee
You sure you copied the query correctly and there are no white spaces causing the issue. I ran in on my SQL Server installation and had no issues.
Esben.D wrote:
You sure you copied the query correctly and there are no white spaces causing the issue. I ran in on my SQL Server installation and had no issues.


I did. The SQL type is SQL Compact