spool fix_invflag.txt PROMPT NO OF ROWS UPDATED IN WSH_DELIVERY_DETAILS TABLE : PROMPT =================================================== update wsh_delivery_details wdd set wdd.oe_interfaced_flag = 'Y', wdd.inv_interfaced_flag = 'Y', wdd.last_update_date = sysdate, wdd.last_updated_by = 3805073 where wdd.delivery_detail_id in ( select det.delivery_detail_id from wsh_delivery_details det, oe_order_lines_all oel where oel.flow_status_code = 'CLOSED' and oel.open_flag = 'N' and oel.line_id = det.source_line_id and released_status = 'C' and ( oe_interfaced_flag = 'N' OR nvl(inv_interfaced_flag, 'N') in ( 'N', 'P' ) ) ) / PROMPT NOTE : PROMPT ======== PROMPT 1. Please run the Script in TEST instance and then PROMPT in PRODUCTION Instance. PROMPT 2. Enter COMMIT to save the changes and ROLLBACK to PROMPT revert the changes. spool off