| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- set define off
- set echo on
- whenever sqlerror exit sql.sqlcode
- alter session set container=ORCLPDB;
- alter session set current_schema=PMS_TEST;
- declare
- v_count number;
- begin
- select count(*) into v_count
- from all_tables
- where owner = 'PMS_TEST'
- and table_name = 'PMS_FJYRJC_MP_GRJJ_BAK_20261119';
- if v_count = 0 then
- execute immediate
- 'create table PMS_TEST.PMS_FJYRJC_MP_GRJJ_BAK_20261119 as '
- || 'select * from PMS_TEST.GRJJ where GRJJMBID = 10543';
- end if;
- select count(*) into v_count
- from all_tables
- where owner = 'PMS_TEST'
- and table_name = 'PMS_FJYRJC_MP_GW_BAK_20261119';
- if v_count = 0 then
- execute immediate
- 'create table PMS_TEST.PMS_FJYRJC_MP_GW_BAK_20261119 as '
- || 'select * from PMS_TEST.GW '
- || 'where GWID in (1015564, 1015565, 1015566)';
- end if;
- end;
- /
- select 'GRJJ' source,count(*) row_count
- from PMS_TEST.PMS_FJYRJC_MP_GRJJ_BAK_20261119
- union all
- select 'GW',count(*)
- from PMS_TEST.PMS_FJYRJC_MP_GW_BAK_20261119;
- exit
|