i m using sql 2000 and i have a table with 3 columns ( credit , debit, total)
what i want to do is whenever a value is inserted to the credit column it should add that amount to the total column and whenever there is a debit value it should Subtract from the total value
can some one please help me with this
i know this should be done by a rule but i cant figure out how to do it
kalpa23
0
Light Poster
Recommended Answers
Jump to PostIs Total supposed to be a running sum or is it simply the current total as reflected by the current credit and debit amounts?
In either case, I would look up triggers and modify your Total value whenever a row as updated.
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.