Subject | how to add subtotal |
---|---|
Author | bill2janesoft@gmail.com |
Post date | 2007-08-22T09:20:01Z |
Hello,
I think that this is a fairly common job, but I don't know how to do it in one sql.
eg, in master/detail invoice tables
table master has 2 fields (key1, tot)
table detail has 3 fields (key1, linenum, subtot)
I want to update all records in master so that
each tot = sum(subtot) for master.key1=detail.key1
thanks in advance
--
regards,
bill
I think that this is a fairly common job, but I don't know how to do it in one sql.
eg, in master/detail invoice tables
table master has 2 fields (key1, tot)
table detail has 3 fields (key1, linenum, subtot)
I want to update all records in master so that
each tot = sum(subtot) for master.key1=detail.key1
thanks in advance
--
regards,
bill