kosmokramer
Programmer
Hey. I am trying to keep track of a person's balance. To do this I have two tables, one that keeps the person's balance, and another which has all the transactions and descriptions. So, when the person submits a new transaction, I want both tables to be updated. I can get the insert to work, but am unsure how to do the nesting on the update statement. I want to be able to combine them into one string so I can use it on an asp page. So, basically what I am asking for is how to get the update statement working, and when it is, how to combine the two statements into one string.
The two statements are:
Insert Into my_Transactions (credit_Debit, transactionDesc, membName,password_Field)
Values (30.00,'Transaction description','Jon Doe','somePassword')
and
Update members_Table set Balance = (Select sum(credit_Debit) from my_Transactions where membName='Jon Doe' and password_Field='somePassword')
Thanks,
Paul
The two statements are:
Insert Into my_Transactions (credit_Debit, transactionDesc, membName,password_Field)
Values (30.00,'Transaction description','Jon Doe','somePassword')
and
Update members_Table set Balance = (Select sum(credit_Debit) from my_Transactions where membName='Jon Doe' and password_Field='somePassword')
Thanks,
Paul