Displaying 1 result from an estimated 1 matches for "waybill_id".
2011 Aug 10
0
sql query in a more "rails 3 way"
...u know how to write the following sql query in a
more "rails way"
UPDATE buy_order_detail
SET saldo = saldo - detail_purchase.cantidad
FROM purchase_detail
INNER JOIN purchase ON purchase.id =
purchaser_detail.purchase_id
INNER JOIN waybill ON waybill.id =
purchase.waybill_id
INNER JOIN buy_order ON buy_order.id =
waybill.order_id
INNER JOIN buy_order_detail ON buy_order.id =
buy_order_detail.order_id
WHERE purchase_detail.product_id = buy_order_detail.product_id
--
You received this message because you are subscribed to the Google Groups "R...