How i do this??

Respectyed gurus,
i hav query? where i have condition when i am making a calculation of suppose lets say
Round(3128*1.75/100) it is coming=54.74 this cosidered as 54.
but my job is to put such a condition in query which will excute when decimal value is greater than " .05"
then it takes as "ceil" value or else "floor" value .
how i do this.??
decode function is not workin becuase of its not excepting the conditional operator.
but i have tried "case"
but i was fail to get it run.
plez help me..

Billy  Verreynne  wrote:
This is the mathematically correct way. If you do want to round based on the 2nd decimal digit and ignore the 1st... I fail to see any logic in that.Mathematically it's the correct way to round, but there may be a requirement, say in engineering, where there are "tolerence levels" on certain things. In which case it's perfectly logical.
That being the case, Frank's solution is just what is required...
SQL> ed
Wrote file afiedt.buf
  1  with t as (select 54.04999 as num from dual union all
  2             select 54.05 from dual union all
  3             select 54.05001 from dual)
  4  --
  5  select num, ceil(num - 0.05) as rnd_num
  6* from t
SQL> /
       NUM    RND_NUM
  54.04999         54
     54.05         54
  54.05001         55
SQL>

Similar Messages

Maybe you are looking for

  • PR to PO lead time

    Hi All Is there any standard report to find PR to PO lead time. Formula to find PR to PO lead time = PO creation date - PR release date Regards Satish Kumar

  • Allowing "Reader Users" to Save MULTIPLE Unique Sets of Forms Data for One Form

    I own Acrobat Pro X. I use it to create many documents in my law practice. I need to deliver a contract form to a client that the client will use again and again and again... The client only owns Acrobat Reader. I need this to be like a "template" in

  • Decimal Places of Key Figure not displaying Correctly

    Hi BW Gurus, I have a key Fig ZLENGTH of type Quantity. I am calculating length in Kilo Meters with this.When I am trying to load the data in my cube with flat file say if value for length is 8.123 Km it is showing in Cube 8.000 . As cklient requirem

  • Anyone know anything about transistor model creation?

    Although it was rather difficult, I've managed to get what may be half decent parameters into a 2n3055 model I'm trying to build. (I can never find the famous ".cir" model for anything.)  The main place where I had zilch was input capacitance.  So, s

  • Web.xml clarification

    Hello, in a servlet we would like to read web.xml sections which are not accessible through the servlet/context-getParameter methods. So we wrote a utility to get access to these elements. The problem is, that we receive an error, if the parser has n