I have a problem with my data in the table. For example, I have three table as describe as the following:

This is my script to do all of these tables.

  1. Procedure 2 Create or Replace procedure updateReceipt (payment number(19,4)) is begin update Receipt set balance=balance+payment where receiptID=...; end;

  2. Procedure 2 Create or Replace procedure studentPayment ( stuID int, stuName varchar2, payment number(19,4), classID int )

is

begin insert into student(...) values(...);

insert into class(...) values(....);

updateReceipt(payment); end;

My question is, when I do query sum(balance) in table receipt, sometime right, sometime over and less. I don't know why this table (receipt) update balance or not?

Could anybody help me to settle this problem? Urgent question!!!!!

Sopolin

link|improve this question

57% accept rate
The question doesn't make any sense - I appreciate the detail of the two sprocs, but your question is why the SUM isn't right and you lack detail about what you are summing. – OMG Ponies Nov 21 '09 at 4:08
This question belongs on stackoverflow.com – OMG Ponies Nov 21 '09 at 4:08
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.