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 |
|
zeeshan13
Constraint Violating Yak Guru
347 Posts |
Posted - 2008-05-16 : 11:09:44
|
| Hi All,I have a table Called Elasticity. Including some other fields it has a field called ElastVal of decimal type (2 places). The records for just this field are like this (example);ElastVal-450.88-32.991.2256.770.99In my select I want to return all the fields from the Elasticity table including Elasticity in a way that even the negative numbers will be reterive as positive.So in the above example the output should be;ElastVal450.8832.991.2256.770.99How Can I do this in my select?Please help.Zee |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2008-05-16 : 11:27:54
|
| Use the ABS function. Returns the absolute value (value without a sign) of what you pass to it--Gail Shaw |
 |
|
|
zeeshan13
Constraint Violating Yak Guru
347 Posts |
Posted - 2008-05-16 : 11:51:36
|
| Thanks for the hint...The following is working...SELECT ABS(ElastVal) ElastVal FROM Elasticity |
 |
|
|
|
|
|