From: Mikhail Entaltsev Date: September 1 2004 10:54am Subject: Re: A question of negative numbers.. List-Archive: http://lists.mysql.com/mysql/171888 Message-Id: <00c901c49012$1a9ca0e0$0e3ca8c0@rover14> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit abs() ----- Original Message ----- From: To: Sent: Wednesday, September 01, 2004 12:59 PM Subject: A question of negative numbers.. Hi, I have a query that returns a list of numbers ranging from -10 to +10 I would like to be able to have a 2nd column where a result of 5 is 5 but -5 is also 5, so in effect all the negative (and only the negative) results are made positive to find the deviation from zero. so 5, 4, -3, 4, -1, 0 would become 5, 4, 3, 4, 1, 0 I have been searching for if then else in google so I could do if a < 0 then a = 0-a but no joy. is there a function to make negative numbers positive?