modulus, truncate in oracle rdb - 04-29-2005 , 04:42 AM
I have a column named period in my oracle rdb database. I now want to
convert the rows in that column like
period = (period + 9) / 10
Ex (100 + 9)/10 = 10,9 -> 10
(101+9)/10 = 11,0 -> 11
doing "...set period = (period+9)/10" (period = 10) will in oracle rdb
give me 2 but doing the exact same thing in C will give me 1 which is
what I want.
Is there any MOD(), TRUNC() etc functions that I could use or any
other way to get this right. I tried to do(-0.5) on my calculated
value do get it to round down bu it gets me other problems when fore
examle I want to convert 0(zero).
I also tried the CAST as integer function without success.