Apologies for the no doubt high "thick-as-a-plank" nature of my query.
Is there any way to convert a negative number to a positive number using SQL. I have a report which joins 2 tables, and I want to join the tables on a 'Quantity' field. Trouble is that the QTYs in 1 table are negative, and the QTYs in the other are positives. I know that that in itself is a stupid thing to do, but anyway.
I just wondered if there is a simple way to get the positive number versions of the numbers:
GET sampledata
WITH sampledata AS
(SELECT -345 var_num
FROM DUAL
UNION ALL
SELECT -423423
FROM DUAL
UNION ALL
SELECT -323.5
FROM DUAL)
SELECT *
FROM sampledata;
Any advice much appreciated.
Thank you
Edited by: jimr on Feb 9, 2010 12:38 PM
Changed subject