Using this query in SQL Server, I get a non float value that is not correct – 10842081
SELECT SUM(CAST(NVARCHAR_column AS FLOAT)) AS kb
FROM table
WHERE 1 = 1
AND ID IN (1234)
AND Time_ > GETDATE()
AND Type IN (1, 2)
AND Parent = 0
While running the same query on the same database, but from a VM, I get a proper result – 4357051.0.
On both my PC and VM I’m running RazorSQL 9.5.2, same drivers and everything.
PC is running Win 10, VM is with Win Server 2019. Column is definde as nvarchar
.
I also tried this on another PCs, VMs and a MAC and all return the correct value of 4357051.0.
Stephen Todorov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
5