日期:2014-05-17 浏览次数:23035 次
create or replace trigger ia_sl before update on po_invoice referencing old as old_value new as new_value for each row declare cursor test_cursor is select ntaxmny, ia_bill_b.cbill_bid from ia_bill_b, po_settlebill_b, po_invoice_b, ia_bill, po_invoice where po_invoice.cinvoiceid = po_invoice_b.cinvoiceid and ia_bill_b.csourcebillitemid = po_settlebill_b.csettlebill_bid and po_settlebill_b.cinvoice_bid = po_invoice_b.cinvoice_bid and ia_bill_b.cbillid = ia_bill.cbillid and ia_bill.bestimateflag = 'N' and po_invoice.cinvoiceid = :new_value.cinvoiceid; begin for nx in test_cursor loop update ia_bill_b set vdef1 = nx.ntaxmny where ia_bill_b.cbill_bid = nx.cbill_bid; end loop; END;