i have a select statement below. The result of r1- @r1 may be positive or negative.
i want it to always result as positive, so it is a negative number then it to show the same number as positive. can i do this?
r1 = 7, @r1 = 4
r1 - @r1 = 3
if r1 = 5, @r1 = 6
r1 = @r1 = -1, but i want this to be 1, because i am trying to work out the difference between the two numbers.
can this be done within a select statement? my select statement is:
SELECT imageurl, (r1 - @r1) AS difference
View Complete Post