需求:当天备份表刷新完数据后,拉取当天数据。
问题:备份表需要刷新完,才拉取数据
解决:
SELECT t.inv_date FROM rmsbak.cmx_item_loc_soh_bak t WHERE 1 = 1 AND t.inv_date = trunc(SYSDATE) AND rownum = 1 AND NOT EXISTS (SELECT object_name FROM gv$locked_object l,dba_objects o WHERE l.object_id = o.object_id AND o.object_name = upper('RMSBAK') AND o.object_name = upper('CMX_ITEM_LOC_SOH_BAK'));原文链接:https://www.f2er.com/oracle/207226.html