Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Rdb > modulus, trunca...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 107 of 191
Post > Topic >>

modulus, truncate in oracle rdb

by rallykarro@[EMAIL PROTECTED] (karolina) Apr 29, 2005 at 02:42 AM

Hi,

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.

Thanks
Karolina
 




 1 Posts in Topic:
modulus, truncate in oracle rdb
rallykarro@[EMAIL PROTECT  2005-04-29 02:42:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 12:44:04 CDT 2008.