Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 change from positive to negative

Author  Topic 

metroix
Starting Member

16 Posts

Posted - 2008-08-04 : 00:28:28
there is a way to convert a sql row from negative to positive?

ex
in the row HELLO i have a -10 value, how can i change that -10 to 10 with a sql query?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-04 : 00:34:50
It's just simple math. Multiple it by -1.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-04 : 05:19:24
Another method is to make use of Abs function

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -