declare
x_po_head_id number ;
begin
select po_header_id
into x_po_head_id
from po_headers_all where
segment1 = '&ponumber'
and org_id = &org_id;
update po_headers_all
set authorization_status = 'APPROVED',
approved_flag = 'Y',
approved_date = sysdate,
last_update_date= sysdate
where po_header_id = x_po_head_id;
update po_line_locations_all
set approved_flag = 'Y'
where po_header_id = x_po_head_id ;
commit;
end;
PO Approve Script
最新推荐文章于 2022-05-25 18:47:11 发布
本文展示了如何使用SQL语句执行更新操作,并通过事务确保数据一致性。具体包括使用SELECT语句查找特定条件的数据,然后使用UPDATE语句进行更新,并在事务结束时提交更改。
630

被折叠的 条评论
为什么被折叠?



