Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Round off problem

Status
Not open for further replies.

tyb

Technical User
Feb 10, 2004
137
IR
Dear frends plz help

when i try to get the product of two text item values into a third one its rounded off to the upper 50.

e.g the values in the boxes are 150.00 & 66.67
and i get the product figure as 10050.00 instead of 10000.5

format mask of all the three boxes is set as 9,999,999,999.99 and the length is 16.

any suggessions plz

thanks in advance
 
Hi,
Tyb I do not see any problem with this.

Check what is the formula you have written for calculation.

Check if the 2nd item which has value of 66.67 is rounded off to 67 otherwise the result should be perefect.

You may chek by running followin query also on sql prompt.

Code:
SQL> select to_char((150.00*66.67),'9,999,999,999.99') from dual;

TO_CHAR((150.00*6
-----------------
        10,000.50

Also recheck your format Masks on all the fields.

HTH
Regards
Himanshu
 
thanks Himan

i had a variable in my trigger declared as

x number(10); and it having no space for decimal points was giving the problem.


best regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top