Number problems

I had made a field with number datatype. While calculating fine using procedure the result displayed is
for eg.
if 5*10 it shows the output 49.999999 whereas while inserting into table it insert it as 50.

why is it so?.......

Thanks for your co-operation in advance.

Comments

  • : I had made a field with number datatype. While calculating fine using procedure the result displayed is
    : for eg.
    : if 5*10 it shows the output 49.999999 whereas while inserting into table it insert it as 50.
    :
    : why is it so?.......
    :
    : Thanks for your co-operation in advance.
    :
    If you don't especify the precision of the field, it can occur this because the way that Oracle mades the operations (i don't know exactly how oracle does it, but i get the same "precision error" lot of times.

    You can evade this by two ways:

    setting the precision of the field like A NUMBER(38,2)

    or rounding the mathematic operation round(5*10)

    Hope this helps
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion