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.
| Author |
Topic |
|
Weekend
Starting Member
20 Posts |
Posted - 2007-07-25 : 07:06:48
|
| HiI have values in col_A (smallint) as follows.1-436-7I want the negative to be remove and result as follows.14367Please advise how?ThanksJawad |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-07-25 : 07:07:56
|
| Select ABS(col_A) from tablename--------------------------------------------------S.Ahamed |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-07-26 : 01:48:50
|
| Hello pbguy,I've updated the values of a table with this abs like thisinitially the records are like thisname creditA -9B -8c -5now i've updated the table like thisupdate mytable set credit=abs(credit)now the values are like thisname creditA 9B 8c 5is it now possible to change all the values with - again?thank you very much...VinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-07-26 : 01:55:48
|
| Waht is the problem?update mytable set credit=(-1)*credit--------------------------------------------------S.Ahamed |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-07-26 : 02:04:14
|
| ohhhhhhhhhhhhhhsorrythat's really my foolishVinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
|
|
|