I have a view that I'm using for CR report. I am using a decode statement so that I can determine which range the specific amount falls in. Just recently, I have come across the need to decode negative numbers. My questions are, how can I include negative numbers correctly? Is there a better way?
As you can see, if the negative number is greater than -1 but less than 0....I'm not picking it up and it falls under the >250K field..
I would like to somehow assign all negative numbers = -50000 so that I can determine for sure if its negative.
thanks
Code:
decode( trunc((decode(s_fees, NULL, 0, s_fees) / 50000)), -1, '<0', 0, ' 0 - 50K', 1, ' 50 - 100K', 2, '100 - 150K', 3, '150 - 200K', 4, '200 - 250K', '> 250K') settlement_amt_interval,
As you can see, if the negative number is greater than -1 but less than 0....I'm not picking it up and it falls under the >250K field..
I would like to somehow assign all negative numbers = -50000 so that I can determine for sure if its negative.
thanks