| 123456789101112131415161718192021222324252627282930313233343536373839 |
- 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_GRCD_BAK_20261119';
- if v_count = 0 then
- execute immediate
- 'create table PMS_TEST.PMS_FJYRJC_GRCD_BAK_20261119 as '
- || 'select * from PMS_TEST.GRCD where SJGRCDID = 1025885';
- end if;
- select count(*)
- into v_count
- from all_tables
- where owner = 'PMS_TEST'
- and table_name = 'PMS_FJYRJC_GW_BAK_20261119';
- if v_count = 0 then
- execute immediate
- 'create table PMS_TEST.PMS_FJYRJC_GW_BAK_20261119 as '
- || 'select * from PMS_TEST.GW where GWID in (102121, 1015484)';
- end if;
- end;
- /
- select 'GRCD' source,count(*) row_count from PMS_TEST.PMS_FJYRJC_GRCD_BAK_20261119
- union all
- select 'GW',count(*) from PMS_TEST.PMS_FJYRJC_GW_BAK_20261119;
- exit
|