Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sum After Decimal

AhmedJul 8 2010 — edited Jul 8 2010
Oracle 9i,
with t as
    (
    select '000001' Ac_code, 4174494.37236   debit, Null Credit  from dual union all 
    select '000001' , 1344.42  debit, Null Credit  from dual union all 
    select '000001' , null, 1344.42 Credit from dual union all 
    select '000001' , Null, 575792.327222069 Credit from dual union all 
    select '000001' , Null, 3598702.04513793 Credit from dual  
    )
select * from t
I m adding Above query Results into my table
my table columns are
Ac_code varchar2(25)
Debit number(25,4)
Credit Number(25,4)

in Query credit and debit value depend on formula some time it shows the 9 value after decimal and some it shows the 2 value after decimal.
I want when I insert data into my table there should not be any difference, debit and credit total must be the same.
but when enter data in my table there is difference in Decimal.
How can I resolve this
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 5 2010
Added on Jul 8 2010
8 comments
2,322 views