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