I am trying to calculate and show the results when the value is not equal to 0.00. When I execute the statement I can see all the values that are higher than 0.00, but the values that are lower than 0.00 are not shown.
I am executing the following statement:
SELECT sum(debit-credit-balance) as 'Open value'
FROM table
WHERE 'Open value' <> CAST('0.00' AS DECIMAL(50,2))
I can see all the values that are higher than 0.00
. But I dont see the values that are lower than 0.00
(example: -100.00
).
Does someone know what is wrong with this statement?
Update 1:
When I use backticks instead of quotes I get the following error message:
#1054 - Unknown column 'Open value' in where clause