Hi friends,
I need to get a round of value in one of my page item field "Balance". For that i have executed the below coding, but it is not bringing the exact value.
declare
a number(30);
begin
select (round(:P7_AMOUNT, 2) + :P7_CURRENT_BALANCE) into a
from n118_b_trans a, n118_bal_trans b
where :P7_ACCOUNT_NO = b.account_no
dbms_output.put_line(a);
end;
If i tested the above code, by entering the value for the following variable as
:P7_AMOUNT = 250.25
:P7_CURRENT_BALANCE = 300
:P7_ACCOUNT_NUMBER=1062
Then 'a' has to return *550.25*,
but the answer that is appearing for me is only 550.
I dont know what went wrong.
Even though for the
amount and the
balance i have too
specified the scale to 4(along with the precision)while defining its datatype in the table, then too why it is not working.
Brgds,
Mini