June 6, 2008 at 6:25 am
Hi,
I’m dealing with a situation where I import data from an excel spreadsheet. One of columns contains decimal amount values, some negative (-256.32) and some not (6586.34). When I initially import the data from the spreadsheet I would like to convert all values to be positive values. Is there some sort of function in MSSQL that can do this, if not what approach can I follow.
Thank you in advance.
R
June 6, 2008 at 7:19 am
SELECT abs(Column_Name)
FROM Table_Name
will convert negative to positive and positive stays same
June 6, 2008 at 7:26 am
June 8, 2008 at 12:30 am
Thanks for all the replies.
Thats exactly what I was looking for.
R
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply