By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,363 Members | 2,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,363 IT Pros & Developers. It's quick & easy.

Showing a negative # as a positive?

P: 31
I'm trying to show some data, and for a complicated reason, all of the integers in a particular field are negative. They're converted to positive in the program that uses them, but I'm using a SELECT statement to show the numbers, and I need them to be shown as positives (and realistically I'd love to show a "$" in front of them, but one battle at a time").

I don't have a CLUE how to do this; is there a way to do this in the select? Hopefully somebody here can help.
May 16 '08 #1
Share this Question
Share on Google+
1 Reply


deepuv04
Expert 100+
P: 227
I'm trying to show some data, and for a complicated reason, all of the integers in a particular field are negative. They're converted to positive in the program that uses them, but I'm using a SELECT statement to show the numbers, and I need them to be shown as positives (and realistically I'd love to show a "$" in front of them, but one battle at a time").

I don't have a CLUE how to do this; is there a way to do this in the select? Hopefully somebody here can help.
Hi,
use the following query

Expand|Select|Wrap|Line Numbers
  1.  
  2.    select abs(column_name) from table_name
  3.  
May 16 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.