我的本意是
update receipt_detail d set d.original_id=71 from costsys_mapping m,receipt r, receipt_feecollection c,receipt_flight f, receipt_detail d where substr(d.fee_id_d,0,6)=m.cost_id and m.cost_mapping_code=APT and d.flight_id=f.flight_id and f.feecollection_id=c.feecollection_id and c.receipt_id_c=r.receipt_id and r.receipt_state='完毕' and d.original_id=0但oracle 的update后不能跟from 多个表,
如何改写
update receipt_detail d set d.original_id=71 from costsys_mapping m,receipt r, receipt_feecollection c,receipt_flight f, receipt_detail d where substr(d.fee_id_d,0,6)=m.cost_id and m.cost_mapping_code=APT and d.flight_id=f.flight_id and f.feecollection_id=c.feecollection_id and c.receipt_id_c=r.receipt_id and r.receipt_state='完毕' and d.original_id=0但oracle 的update后不能跟from 多个表,
如何改写
set d.original_id = 71
where exists (select 1 from costsys_mapping m where substr(d.fee_id_d, 0, 6) = m.cost_id and m.cost_mapping_code = APT)
and d.original_id = 0其它的几个条件没有看到关联关系。