Jump to content

Archived

This topic is now archived and is closed to further replies.

takeiteasy

calculate balance

Recommended Posts

I have this problem here, i want to generate outstanding balance in my codes.
i have 2 attributes, quotes and amtPaid in mysql table.
my outstanding balance = quotes - amtPaid
so do i need to declare a new attribute in the MySQL table?
do MySQl have Subtraction aggregate functions?

Thanks In Advance!

Share this post


Link to post
Share on other sites
[!--quoteo(post=368767:date=Apr 26 2006, 03:58 AM:name=takeiteasy)--][div class=\'quotetop\']QUOTE(takeiteasy @ Apr 26 2006, 03:58 AM) [snapback]368767[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I have this problem here, i want to generate outstanding balance in my codes.
i have 2 attributes, quotes and amtPaid in mysql table.
my outstanding balance = quotes - amtPaid
so do i need to declare a new attribute in the MySQL table?
do MySQl have Subtraction aggregate functions?

Thanks In Advance!
[/quote]

Try this out

"select (quotes-amtPaid) as outstanding_balance from table_name"

hth

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.