还是带有SQL Server的习惯,在Oracle中经常使用update from结构,事实上Oracle中是不存在from语句的。
1
update hek_om_pop_lines_all2
set quantity_2 = quantity_13
from hek_om_pop_lines_all l, hek_om_pop_headers_all h, hek_om_user_ctl_v ctl4
where l.header_id = h.header_id5
and h.sold_to_org_id = ctl.customer_id6
and h.flow_status = 'enter'7
and to_char(h.creation_date,'yyyymmdd') >= &p_start_date8
and to_char(h.creation_date,'yyyymmdd') <= &p_end_date9
and ctl.user_id = 1115 -- apps.fnd_profile.VALUE('user_id')10
and application = 'POP';error:ORA-00933:SQL Command not properly ended
1
update hek_om_pop_lines_all2
set quantity_2 = quantity_13
where header_id in (select h.header_id 4
from hek_om_pop_headers_all h, hek_om_user_ctl_v ctl5
where h.flow_status = 'enter'6
and to_char(h.creation_date,'yyyymmdd') >= &p_start_date7
and to_char(h.creation_date,'yyyymmdd') <= &p_end_date8
and ctl.user_id = 1115 -- apps.fnd_profile.VALUE('user_id')9
and application = 'POP'10
and h.sold_to_org_id = ctl.customer_id);