This is a migrated thread and some comments may be shown as answers.

[Solved] How get the decimal values with 2 percision without rounding the Values

0 Answers 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jayashree
Top achievements
Rank 1
Jayashree asked on 10 Jul 2009, 11:17 AM
Hi,

        I have a problem in sql, my value is 62.69 and if i split that values in "%" then 

  •     20% = 12.5380
  •     30%=18.8070
  •     50%=31.3450

    The sum of this Total will be 62.69

But i need only decimal with 2 percision then the values "%" value would be like this

  •     20% = 12.54 (rounded as 12.54  for(12.5380)
  •     30%=18.81 (rounded as 12.54  for(18.8070)
  •     50%=31.35 (rounded as 12.54  for(31.3450

        The Sum of the Total will be 62.70.

So how to handle such case, can any one help me out in this

Thanks,
Jayashree.S

 

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Jayashree
Top achievements
Rank 1
Share this question
or