22,302
社区成员




update A set total_value= (select sum(quantity*unit_price*B.form_money_rate) from purchase_sub_and_box ) from purchase_box A,purchase_form B,
purchase_sub_and_box C,purchase_sub_form D where D.purchase_form_id=B.id
and D.purchase_sub_no=C.order_no and C.box_id=A.id
update A set total_value= (select sum(quantity*unit_price*B.form_money_rate) from purchase_sub_and_box ) from purchase_box A,purchase_form B,update A set total_value= (select sum(quantity*unit_price) from
purchase_sub_and_box where box_id=A.id)
from purchase_box A
update A set total_value= (select sum(B.quantity*B.unit_price) from
purchase_sub_and_box where box_id=A.id)
from purchase_box A