I still have the habit of using SQL Server. in Oracle, the update from structure is often used. In fact, there is no from statement in Oracle.
Code
1 Update Hek_om_pop_lines_all
2 Set Quantity_2 = Quantity_1
3 From Hek_om_pop_lines_all L, hek_om_pop_headers_all H, hek_om_user_ctl_v CTL
4 Where L. header_id = H. header_id
5 And H. sold_to_org_id = CTL. customer_id
6 And H. flow_status = ' Enter '
7 And To_char (H. creation_date, ' Yyyymmdd ' ) > = & P_start_date
8 And To_char (H. creation_date, ' Yyyymmdd ' ) <= & P_end_date
9 And CTL. User_id = 1115 -- Apps. fnd_profile.value ('user _ id ')
10 And Application = ' Pop ' ; Error: ORA-00933: SQL command not properly ended Code
1 Update Hek_om_pop_lines_all
2 Set Quantity_2 = Quantity_1
3 Where Header_id In ( Select H. header_id
4 From Hek_om_pop_headers_all H, hek_om_user_ctl_v CTL
5 Where H. flow_status = ' Enter '
6 And To_char (H. creation_date, ' Yyyymmdd ' ) > = & P_start_date
7 And To_char (H. creation_date, ' Yyyymmdd ' ) <= & P_end_date
8 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 );