table_a table_b
-------------- ----------
product,amount,pcode rounding,pcode
-------------- ----------
apple,100.00,001 0.02,001
orange,150.02,001 -0.02,001
output
----------
apple,100.02
orange,150.00
select a.product||','||sum(a.amount)+b.rounding from table_a a,table_b b
where a.pcode=b.pcode
group by a.product,b.rounding
Hi , I trying to spooling this query to csv format, but showing error:
ORA-01722 invalid number.
when I remove +b.rounding then no issued at all, may I know how to use sum(a.amount)+b.rounding in my query ?
your kinds assist is much appreciated.