text: -- prepare
  DROP TABLE IF EXISTS PDLGD_OF_TA351307;
  CREATE UNLOGGED TABLE PDLGD_OF_TA351307
  (      
        TA351307001                 VARCHAR(20)  
        ,TA351307003                VARCHAR(60)  
        ,TA351307005                DECIMAL(16,4)
        ,TA351307010                DECIMAL(7,4) 
        ,Etl_Tx_Dt                  DATE         
  )
  DISTRIBUTE BY HASH(TA351307001)  
  ;
  
  DROP TABLE IF EXISTS PDLGD_OF_TA351307_NEW;
  CREATE UNLOGGED TABLE PDLGD_OF_TA351307_NEW
  (      
        TA351307001                 VARCHAR(20)  
        ,TA351307003                VARCHAR(60)  
        ,TA351307005                DECIMAL(16,4)
        ,TA351307010                DECIMAL(7,4) 
        ,Etl_Tx_Dt                  DATE         
  )
  DISTRIBUTE BY HASH(TA351307001)  
  ;
  
  DROP TABLE IF EXISTS Provi_Amt_OF_TA490461;
  CREATE UNLOGGED TABLE Provi_Amt_OF_TA490461
  (      
        TA490461001                 VARCHAR(20)    
        ,TA490461003                VARCHAR(60)    
        ,Provi_Amt                  DECIMAL(16,2)  
        ,Etl_Tx_Dt                  DATE           
  )
  DISTRIBUTE BY HASH(TA490461001)  
  ;
  
  create schema EDISum;
  DROP TABLE IF EXISTS EDISum.C03_CORP_LOAN_OPENRATE;
  CREATE TABLE EDISum.C03_CORP_LOAN_OPENRATE
       (
        AGACCNO VARCHAR(17)  ,
        LOANNO VARCHAR(17)  ,
        LOANSQNO CHAR(3)  ,
        RATE DECIMAL(10,0)  NOT NULL DEFAULT 0. ,
        FLOARATE DECIMAL(10,0)  NOT NULL DEFAULT 0. ,
        OPENDATE DATE   NOT NULL)
  DISTRIBUTE BY HASH ( AGACCNO );
  
  DROP TABLE IF EXISTS EDISum.C03_CORP_LOAN_AGT;
  CREATE TABLE EDISum.C03_CORP_LOAN_AGT 
       (
        DATA_DT DATE   NOT NULL,
        ORGANNO CHAR(10)  NOT NULL,
        LOANNO CHAR(17)  NOT NULL,
        LOANSQNO CHAR(3)  NOT NULL,
        AGACCNO CHAR(17)  NOT NULL,
        Loan_Contr_Num VARCHAR(60)  NOT NULL,
        CINO VARCHAR(15)  NOT NULL,
        Status DECIMAL(1,0)  NOT NULL,
        BALANCE DECIMAL(20,4)  NOT NULL,
        OVRBALANCE DECIMAL(20,4)  NOT NULL,
        CURRTYPE DECIMAL(3,0)  NOT NULL,
        SUBCODE DECIMAL(7,0)  NOT NULL,
        Busi_Kind CHAR(5)  NOT NULL,
        Loan_Mode CHAR(5)  NOT NULL,
        Loan_Mode_Dtl CHAR(5)  NOT NULL,
        Loan_Dir CHAR(12)  NOT NULL,
        Level12_Class_Cd CHAR(5)  NOT NULL,
        Contr_Level5_Class_Cd CHAR(5)  NOT NULL,
        Guar_Coef DECIMAL(9,6)  NOT NULL,
        VALUEDAY DATE   NOT NULL,
        MATUDATE DATE   NOT NULL,
        EXHMATUD DATE   NOT NULL,
        EXECRATE DECIMAL(9,6)  NOT NULL,
        RATE DECIMAL(9,6)  NOT NULL,
        RATEFLTT DECIMAL(1,0)  NOT NULL,
        FLOATRATE DECIMAL(9,6)  NOT NULL,
        OVREXECRATE DECIMAL(9,6)  NOT NULL,
        OVRRATE DECIMAL(9,6)  NOT NULL,
        FINRFLTT DECIMAL(1,0)  NOT NULL,
        OVRFLOATRATE DECIMAL(9,6)  NOT NULL,
        Cust_Breach_Prob DECIMAL(16,4)  NOT NULL,
        Debt_Breach_Lossrate DECIMAL(7,4)  NOT NULL)
  DISTRIBUTE BY HASH ( AGACCNO );
  
  CREATE TABLE EDISum.C00_ICBC_INT_ORG_OVERVIEW_H
       (
        Int_Org_Num VARCHAR(30)  NOT NULL,
        Start_Dt DATE   NOT NULL,
        Int_Org_Num_Nm VARCHAR(200)  NOT NULL,
        Int_Org_Num_Type CHAR(3)  NOT NULL,
        Int_Org_Num_Subbranch VARCHAR(30)  NOT NULL,
        Int_Org_Num_Subbranch_Nm VARCHAR(200)  NOT NULL,
        Int_Org_Num_Branch VARCHAR(30)  NOT NULL,
        Int_Org_Num_Branch_Nm VARCHAR(200)  NOT NULL,
        Int_Org_Num_Probranch VARCHAR(30)  NOT NULL,
        Int_Org_Num_Probranch_Nm VARCHAR(200)  NOT NULL,
        End_Dt DATE   NOT NULL,
        Etl_Job CHAR(60)  NOT NULL)
  DISTRIBUTE BY HASH ( Int_Org_Num );
  
  create schema EDIODS;
  DROP TABLE IF EXISTS EDIODS.GCC_ACR_CREDIT_LIST;
  CREATE TABLE EDIODS.GCC_ACR_CREDIT_LIST 
       (
        CREDIT_OCCUPY_CINO VARCHAR(20)  NOT NULL,
        APP_NO VARCHAR(20)  NOT NULL,
        BUSI_NO VARCHAR(60)  NOT NULL,
        AGMT_NO VARCHAR(60)  ,
        BUSI_BELONG_CINO VARCHAR(20)  ,
        PRODUCT_NO VARCHAR(8)  ,
        BUSI_BAL DECIMAL(19,4) ,
        BUSI_CURRTYPE VARCHAR(3)  ,
        BUSI_BEGIN_DATE VARCHAR(8)  ,
        BUSI_END_DATE VARCHAR(8)  ,
        BUSI_AREA_NO VARCHAR(10)  ,
        TRACE_NO VARCHAR(5)  ,
        FINA_QUAL_NO VARCHAR(5)  ,
        CREDIT_OCCUPY_DATE VARCHAR(8)  ,
        COLL_FINAPROT_FLAG VARCHAR(1)  ,
        CREDIT_ITEM VARCHAR(5)  ,
        PROJECT_FLAG VARCHAR(2)  ,
        CIRC_FLAG VARCHAR(2)  ,
        CNB_ASSURE_FLAG VARCHAR(2)  ,
        COLL_DEBT_FLAG VARCHAR(2)  ,
        DEBT_CREDIT_TYPE VARCHAR(2)  ,
        UP_DOWN_FLAG VARCHAR(2)  ,
        VARIETY_COEFF DECIMAL(10,4) ,
        TERM DECIMAL(8,0) ,
        TERM_COEFF DECIMAL(10,4) ,
        ASSURE_COEFF DECIMAL(10,4) ,
        AREA_COEFF DECIMAL(10,4) ,
        TRACE_COEFF DECIMAL(10,4) ,
        FINA_QUAL_COEFF DECIMAL(10,4) ,
        RAMIFI_TRAN_COEFF DECIMAL(10,4) ,
        COLL_FINAPROT_COEFF DECIMAL(10,4) ,
        FINANCING_BAL DECIMAL(19,4) ,
        VENTURE_QUANT DECIMAL(19,4) ,
        ASSURE_CONTR_FLAG VARCHAR(1)  ,
        CREDIT_BAL DECIMAL(19,4) ,
        GUARANTEE_BAL DECIMAL(19,4) ,
        MORTAGAGE_BAL DECIMAL(19,4) ,
        IMPAWN_BAL DECIMAL(19,4) ,
        OCCUPY_STATUS VARCHAR(1)  ,
        OCCUPY_CINO_APPNO VARCHAR(20)  ,
        CUST_TYPE VARCHAR(1)  ,
        OPERATE_TIME VARCHAR(14)  ,
        LOWRISK_FLAG VARCHAR(1)  ,
        FATHER_BUSI_NO VARCHAR(60)  ,
        THIRD_FLAG VARCHAR(1)  ,
        WITHDRAW_FLAG VARCHAR(1)  ,
        REMARK1 VARCHAR(100)  ,
        REMARK2 VARCHAR(100)  ,
        REMARK3 VARCHAR(100)  ,
        REMARK4 VARCHAR(1000)  ,
        REMARK5 VARCHAR(1000)  ,
        REMARK6 VARCHAR(1000)  ,
        REMARK7 DECIMAL(19,4) ,
        REMARK8 DECIMAL(19,4) ,
        REMARK9 DECIMAL(19,4) ,
        BUSI_CINO_APPNO VARCHAR(20)  ,
        TIMESTAMP_1 VARCHAR(20)  ,
        ASSURE_TYPE VARCHAR(5)  ,
        PREOCCUPY_FLAG VARCHAR(1)  ,
        DEAL_TYPE VARCHAR(1)  ,
        WORK_DATE VARCHAR(8)  ,
        MARGIN_BAL DECIMAL(19,4) ,
        MARGIN_CURRTYPE VARCHAR(3)  ,
        Etl_First_Dt DATE   NOT NULL,
        Etl_Tx_Dt DATE   NOT NULL,
        Record_Del_Dt DATE   NOT NULL)
  DISTRIBUTE BY HASH(BUSI_NO);
  
  DROP TABLE IF EXISTS EDIODS.EDW_NFLNRAT;
  CREATE TABLE EDIODS.EDW_NFLNRAT 
       (
        ZONENO DECIMAL(5,0)   NOT NULL,
        ACTBRNO DECIMAL(5,0)   NOT NULL,
        PHYBRNO DECIMAL(5,0)   NOT NULL,
        ACCNO DECIMAL(17,0)   NOT NULL,
        LOANNO DECIMAL(17,0)   NOT NULL,
        LOANSQNO DECIMAL(3,0)   NOT NULL,
        RATE DECIMAL(9,0)   NOT NULL,
        FLOARATE DECIMAL(9,0)   NOT NULL,
        OVRRATE DECIMAL(9,0)   NOT NULL,
        FINFRATE DECIMAL(9,0)   NOT NULL,
        RTDATE1 VARCHAR(10)  NOT NULL,
        AMOUNT1 DECIMAL(17,0)   NOT NULL,
        RTDATE2 VARCHAR(10)  NOT NULL,
        AMOUNT2 DECIMAL(17,0)   NOT NULL,
        RTDATE3 VARCHAR(10)  NOT NULL,
        AMOUNT3 DECIMAL(17,0)   NOT NULL,
        RTDATE4 VARCHAR(10)  NOT NULL,
        AMOUNT4 DECIMAL(17,0)   NOT NULL,
        RTDATE5 VARCHAR(10)  NOT NULL,
        AMOUNT5 DECIMAL(17,0)   NOT NULL,
        RTDATE6 VARCHAR(10)  NOT NULL,
        AMOUNT6 DECIMAL(17,0)   NOT NULL,
        RTDATE7 VARCHAR(10)  NOT NULL,
        AMOUNT7 DECIMAL(17,0)   NOT NULL,
        RTDATE8 VARCHAR(10)  NOT NULL,
        AMOUNT8 DECIMAL(17,0)   NOT NULL,
        RTDATE9 VARCHAR(10)  NOT NULL,
        AMOUNT9 DECIMAL(17,0)   NOT NULL,
        RTDATE10 VARCHAR(10)  NOT NULL,
        AMOUNT10 DECIMAL(17,0)   NOT NULL,
        RTDATE11 VARCHAR(10)  NOT NULL,
        AMOUNT11 DECIMAL(17,0)   NOT NULL,
        RTDATE12 VARCHAR(10)  NOT NULL,
        AMOUNT12 DECIMAL(17,0)   NOT NULL,
        Etl_First_Dt DATE   NOT NULL,
        Etl_Tx_Dt DATE   NOT NULL,
        Record_Del_Dt DATE   NOT NULL)
  DISTRIBUTE BY HASH(ACCNO);
  
  DROP TABLE IF EXISTS EDIODS.CCM_CM_NEW_SEQ;
  CREATE TABLE EDIODS.CCM_CM_NEW_SEQ 
       (
        ENTERPRISE_CODE VARCHAR(20)  ,
        SEQ_CODE VARCHAR(20)  ,
        NEW_SEQ VARCHAR(50)  ,
        OLD_E_CODE VARCHAR(20)  ,
        OLD_SEQ VARCHAR(50)  NOT NULL,
        OP_DATE VARCHAR(8)  ,
        OPERATOR VARCHAR(9)  ,
        OP_AREA VARCHAR(10)  ,
        NEW_BANK VARCHAR(10)  ,
        OLD_BANK VARCHAR(10)  ,
        SEQ_NUMBER VARCHAR(20)  ,
        Etl_First_Dt DATE   NOT NULL,
        Etl_Tx_Dt DATE   NOT NULL,
        Record_Del_Dt DATE   NOT NULL)
  DISTRIBUTE BY HASH(ENTERPRISE_CODE);
  
  DROP TABLE IF EXISTS EDIODS.MF1_NTHLNSUB;
  CREATE TABLE EDIODS.MF1_NTHLNSUB 
       (
        ACCNO char(17)   NOT NULL,
        AGACCNO char(17)   NOT NULL,
        LOANNO char(17)   NOT NULL,
        LOANSQNO char(3)   NOT NULL,
        CURRTYPE DECIMAL(3,0)   NOT NULL,
        STATUS DECIMAL(1,0)   NOT NULL,
        ACCNAME CHAR(60)  NOT NULL,
        PREPRODTYPE char(5)   NOT NULL,
        PRECUSTCLAS char(5)   NOT NULL,
        PREDEALTERM DECIMAL(5,0)   NOT NULL,
        PREPRODCODE2 char(5)   NOT NULL,
        PREPRODCODE3 char(5)   NOT NULL,
        PREPRODCODE1 DECIMAL(7,0)   NOT NULL,
        PRESUBCOD DECIMAL(7,0)   NOT NULL,
        PREBAL DECIMAL(17,0)   NOT NULL,
        PREOVRBAL DECIMAL(17,0)   NOT NULL,
        PREIITPRODCODE1 DECIMAL(7,0)   NOT NULL,
        PREIITSUBCOD DECIMAL(7,0)   NOT NULL,
        PREIITBAL DECIMAL(17,0)   NOT NULL,
        PREOITPRODCODE1 DECIMAL(7,0)   NOT NULL,
        PREOITSUBCOD DECIMAL(7,0)   NOT NULL,
        PREOITBAL DECIMAL(17,0)   NOT NULL,
        LSTPRODTYPE char(5)   NOT NULL,
        LSTCUSTCLAS char(5)   NOT NULL,
        LSTDEALTERM DECIMAL(5,0)   NOT NULL,
        LSTPRODCODE2 char(5)   NOT NULL,
        LSTPRODCODE3 char(5)   NOT NULL,
        LSTPRODCODE1 DECIMAL(7,0)   NOT NULL,
        LSTSUBCOD DECIMAL(7,0)   NOT NULL,
        LSTBAL DECIMAL(17,0)   NOT NULL,
        LSTOVRBAL DECIMAL(17,0)   NOT NULL,
        LSTIITPRODCODE1 DECIMAL(7,0)   NOT NULL,
        LSTIITSUBCOD DECIMAL(7,0)   NOT NULL,
        LSTIITBAL DECIMAL(17,0)   NOT NULL,
        LSTOITPRODCODE1 DECIMAL(7,0)   NOT NULL,
        LSTOITSUBCOD DECIMAL(7,0)   NOT NULL,
        LSTOITBAL DECIMAL(17,0)   NOT NULL,
        PRODTYPE char(5)   NOT NULL,
        CUSTCLAS char(5)   NOT NULL,
        DEALTERM DECIMAL(5,0)   NOT NULL,
        PRODCODE2 char(5)   NOT NULL,
        PRODCODE3 char(5)   NOT NULL,
        PRODCODE1 DECIMAL(7,0)   NOT NULL,
        SUBCODE DECIMAL(7,0)   NOT NULL,
        BALANCE DECIMAL(17,0)   NOT NULL,
        OVRBALANCE DECIMAL(17,0)   NOT NULL,
        IITPRODCODE1 DECIMAL(7,0)   NOT NULL,
        IITSUBCOD DECIMAL(7,0)   NOT NULL,
        IITBALANCE DECIMAL(17,0)   NOT NULL,
        OITPRODCODE1 DECIMAL(7,0)   NOT NULL,
        OITSUBCOD DECIMAL(7,0)   NOT NULL,
        OITBALANCE DECIMAL(17,0)   NOT NULL,
        BALF DECIMAL(1,0)   NOT NULL,
        CVTOTBAL DECIMAL(17,0)   NOT NULL,
        CVBAL DECIMAL(17,0)   NOT NULL,
        IITCVTOTBAL DECIMAL(17,0)   NOT NULL,
        IITCVBAL DECIMAL(17,0)   NOT NULL,
        OITCVTOTBAL DECIMAL(17,0)   NOT NULL,
        OITCVBAL DECIMAL(17,0)   NOT NULL,
        PRETRAND DATE  ,
        LSTCINTD DATE  ,
        LSTTRAND DATE  ,
        LSTMODFD DATE  ,
        CLITLSTD DATE  ,
        OPENDATE DATE  ,
        OPENTLNO char(5)   NOT NULL,
        CLOSDATE DATE  ,
        CLOSTLNO char(5)   NOT NULL,
        ORGANNO char(10)   NOT NULL,
        ACTCODE char(10)   NOT NULL,
        PRESTATUS DECIMAL(1,0)   NOT NULL,
        BAKDEC1 DECIMAL(3,0)   NOT NULL,
        BAKDEC2 DECIMAL(9,0)   NOT NULL,
        BAKDEC3 DECIMAL(17,0)   NOT NULL,
        BAKCHR1 CHAR(60)  NOT NULL,
        Etl_First_Dt DATE   NOT NULL,
        Etl_Tx_Dt DATE   NOT NULL,
        Record_Del_Dt DATE   NOT NULL)
  DISTRIBUTE BY HASH(AGACCNO);
  
  DROP TABLE IF EXISTS EDIODS.MF1_NTHLNCON;
  CREATE TABLE EDIODS.MF1_NTHLNCON 
       (
        ACCNO char(17)   NOT NULL,
        AGACCNO char(17)   NOT NULL,
        LOANNO char(17)   NOT NULL,
        LOANSQNO char(3)   NOT NULL,
        INFOCODE char(5)   NOT NULL,
        LNMEMNO char(11)   NOT NULL,
        LOANNATU DECIMAL(1,0)   NOT NULL,
        LOANTYPE DECIMAL(3,0)   NOT NULL,
        DEPDEPAT DECIMAL(1,0)   NOT NULL,
        DEPACCNO CHAR(34)  NOT NULL,
        LOANBAL DECIMAL(17,0)   NOT NULL,
        VALUEDAY DATE  ,
        MATUDATE DATE  ,
        EXHMATUD DATE  ,
        CALINTCL DECIMAL(1,0)   NOT NULL,
        RATEINCM DECIMAL(1,0)   NOT NULL,
        RATEFLCL DECIMAL(3,0)   NOT NULL,
        RATEVALD DATE  ,
        RATECHGD DATE  ,
        MEMFDATE DATE  ,
        RATECODE DECIMAL(7,0)   NOT NULL,
        EXHRCODE DECIMAL(7,0)   NOT NULL,
        FINRCODE DECIMAL(7,0)   NOT NULL,
        CHGRCODE DECIMAL(7,0)   NOT NULL,
        RATEDFLG DECIMAL(1,0)   NOT NULL,
        FLOARATE DECIMAL(9,0)   NOT NULL,
        EXHFRATE DECIMAL(9,0)   NOT NULL,
        FINFRATE DECIMAL(9,0)   NOT NULL,
        RTNMODE DECIMAL(3,0)   NOT NULL,
        GHLIMIT DECIMAL(1,0)   NOT NULL,
        TOTTIMES DECIMAL(3,0)   NOT NULL,
        NEXTIMES DECIMAL(3,0)   NOT NULL,
        LSTRTND DATE  ,
        NEXTRTND DATE  ,
        CALBAL DECIMAL(17,0)   NOT NULL,
        CALTOT DECIMAL(3,0)   NOT NULL,
        CALNEXT DECIMAL(3,0)   NOT NULL,
        BEGNDATE DATE  ,
        ENDDATE DATE  ,
        BRTNFLAG DECIMAL(1,0)   NOT NULL,
        ADJFLAG DECIMAL(1,0)   NOT NULL,
        ADJDATE DATE  ,
        INTMODE DECIMAL(1,0)   NOT NULL,
        FIXDATE DECIMAL(3,0)   NOT NULL,
        NEXTINTD DATE  ,
        CEASDATE DATE  ,
        OVRCLINT DECIMAL(1,0)   NOT NULL,
        FIELD1 DECIMAL(9,0)   NOT NULL,
        BAKDEC1 DECIMAL(3,0)   NOT NULL,
        BAKDEC2 DECIMAL(9,0)   NOT NULL,
        BAKDEC3 DECIMAL(17,0)   NOT NULL,
        BAKCHR1 CHAR(60)  NOT NULL,
        Etl_First_Dt DATE   NOT NULL,
        Etl_Tx_Dt DATE   NOT NULL,
        Record_Del_Dt DATE   NOT NULL)
  DISTRIBUTE BY HASH(AGACCNO);
  
  DROP TABLE IF EXISTS EDIODS.CCM_TA200261;
  CREATE TABLE EDIODS.CCM_TA200261 
       (
        TA200261001 VARCHAR(20)  NOT NULL,
        TA200261002 VARCHAR(44)  ,
        TA200261004 VARCHAR(30)  ,
        TA200261005 DECIMAL(11,6) ,
        TA200261006 DECIMAL(9,6) ,
        TA200261007 DECIMAL(13,2) ,
        TA200261008 VARCHAR(8)  ,
        TA200261009 VARCHAR(32)  NOT NULL,
        TA200261010 VARCHAR(9)  ,
        TA200261011 DECIMAL(16,2) ,
        TA200261012 VARCHAR(5)  ,
        TA200261013 VARCHAR(8)  ,
        TA200261014 VARCHAR(8)  ,
        TA200261015 DECIMAL(16,2) ,
        TA200261016 DECIMAL(16,2) ,
        TA200261017 DECIMAL(16,2) ,
        TA200261018 DECIMAL(16,2) ,
        TA200261019 DECIMAL(16,2) ,
        TA200261020 VARCHAR(5)  ,
        TA200261021 VARCHAR(17)  ,
        TA200261022 VARCHAR(1)  ,
        TA200261023 VARCHAR(20)  ,
        TA200261024 VARCHAR(8)  ,
        TA200261025 VARCHAR(10)  ,
        TA200261026 VARCHAR(44)  ,
        TA200261027 VARCHAR(1)  ,
        TA200261028 VARCHAR(3)  ,
        TA200261900 VARCHAR(6)  ,
        TA200261029 VARCHAR(5)  ,
        TA200261030 VARCHAR(5)  ,
        TA200261031 VARCHAR(5)  ,
        TA200261032 VARCHAR(8)  ,
        TA200261033 VARCHAR(7)  ,
        TA200261034 DECIMAL(9,6) ,
        TA200261035 VARCHAR(5)  ,
        TA200261036 VARCHAR(5)  ,
        TA200261037 VARCHAR(5)  ,
        TA200261038 VARCHAR(5)  ,
        TA200261039 VARCHAR(10)  ,
        TA200261040 VARCHAR(25)  ,
        TA200261041 VARCHAR(20)  ,
        TA200261042 VARCHAR(7)  ,
        TA200261043 VARCHAR(5)  ,
        TA200261044 VARCHAR(8)  ,
        TA200261045 VARCHAR(1)  ,
        TA200261046 VARCHAR(144)  ,
        TA200261047 DECIMAL(16,2) ,
        TA200261048 DECIMAL(16,2) ,
        Etl_First_Dt DATE   NOT NULL,
        Etl_Tx_Dt DATE   NOT NULL,
        Record_Del_Dt DATE   NOT NULL)
  DISTRIBUTE BY HASH(TA200261001);
  
  DROP TABLE IF EXISTS EDIODS.CCM_TA200251;
  CREATE TABLE EDIODS.CCM_TA200251 
       (
        TA200251001 VARCHAR(20)  NOT NULL,
        TA200251002 VARCHAR(8)  ,
        TA200251003 VARCHAR(44)  ,
        TA200251004 DECIMAL(16,2) ,
        TA200251005 VARCHAR(40)  ,
        TA200251006 VARCHAR(40)  ,
        TA200251007 VARCHAR(5)  ,
        TA200251008 VARCHAR(5)  ,
        TA200251009 VARCHAR(5)  ,
        TA200251010 VARCHAR(5)  ,
        TA200251011 VARCHAR(5)  ,
        TA200251012 VARCHAR(5)  ,
        TA200251013 VARCHAR(5)  ,
        TA200251014 VARCHAR(20)  ,
        TA200251015 VARCHAR(20)  ,
        TA200251016 DECIMAL(16,2) ,
        TA200251017 DECIMAL(3,2) ,
        TA200251018 DECIMAL(3,2) ,
        TA200251019 DECIMAL(3,2) ,
        TA200251020 VARCHAR(20)  ,
        TA200251021 VARCHAR(20)  ,
        TA200251023 VARCHAR(20)  ,
        TA200251024 VARCHAR(20)  ,
        TA200251026 VARCHAR(160)  ,
        TA200251028 VARCHAR(20)  ,
        TA200251030 DECIMAL(16,2) ,
        TA200251031 VARCHAR(7)  ,
        TA200251032 VARCHAR(44)  NOT NULL,
        TA200251033 VARCHAR(5)  ,
        TA200251035 VARCHAR(24)  ,
        TA200251036 VARCHAR(8)  ,
        TA200251037 VARCHAR(8)  ,
        TA200251038 VARCHAR(9)  ,
        TA200251039 VARCHAR(20)  ,
        TA200251040 VARCHAR(1)  ,
        TA200251041 VARCHAR(33)  ,
        TA200251042 VARCHAR(1)  ,
        TA200251043 VARCHAR(1)  ,
        TA200251044 VARCHAR(1)  ,
        TA200251045 VARCHAR(100)  ,
        TA200251046 VARCHAR(1)  ,
        TA200251047 VARCHAR(10)  ,
        TA200251048 VARCHAR(20)  ,
        TA200251900 VARCHAR(6)  ,
        TA200251049 VARCHAR(5)  ,
        TA200251050 VARCHAR(44)  ,
        TA200251051 VARCHAR(5)  ,
        TA200251052 VARCHAR(5)  ,
        TA200251053 VARCHAR(40)  ,
        TA200251054 VARCHAR(10)  ,
        TA200251055 DECIMAL(9,6) ,
        TA200251056 VARCHAR(5)  ,
        TA200251057 DECIMAL(9,6) ,
        TA200251058 VARCHAR(5)  ,
        TA200251059 DECIMAL(9,6) ,
        TA200251060 VARCHAR(5)  ,
        TA200251061 VARCHAR(20)  ,
        TA200251062 VARCHAR(5)  ,
        TA200251063 VARCHAR(34)  ,
        TA200251064 VARCHAR(7)  ,
        TA200251065 VARCHAR(500)  ,
        TA200251066 VARCHAR(1)  ,
        TA200251067 DECIMAL(16,2) ,
        TA200251068 DECIMAL(16,2) ,
        TA200251069 VARCHAR(10)  ,
        TA200251070 VARCHAR(17)  ,
        TA200251071 VARCHAR(8)  ,
        TA200251072 VARCHAR(1)  ,
        TA200251073 VARCHAR(20)  ,
        TA200251074 VARCHAR(5)  ,
        TA200251075 VARCHAR(5)  ,
        TA200251076 VARCHAR(8)  ,
        TA200251078 VARCHAR(1)  ,
        TA200251079 VARCHAR(1)  ,
        TA200251080 VARCHAR(5)  ,
        Etl_First_Dt DATE   NOT NULL,
        Etl_Tx_Dt DATE   NOT NULL,
        Record_Del_Dt DATE   NOT NULL)
  DISTRIBUTE BY HASH(TA200251001);
  
  DROP TABLE IF EXISTS EDIODS.CCM_TA200268;
  CREATE TABLE EDIODS.CCM_TA200268 
       (
        TA200268001 VARCHAR(20)  NOT NULL,
        TA200268002 VARCHAR(50)  ,
        TA200268003 VARCHAR(50)  NOT NULL,
        TA200268004 VARCHAR(10)  ,
        TA200268005 VARCHAR(10)  ,
        TA200268006 VARCHAR(10)  ,
        TA200268007 VARCHAR(10)  ,
        TA200268008 VARCHAR(10)  ,
        TA200268009 VARCHAR(10)  ,
        TA200268010 VARCHAR(50)  ,
        TA200268011 VARCHAR(10)  ,
        TA200268012 VARCHAR(10)  ,
        TA200268013 VARCHAR(10)  ,
        TA200268014 VARCHAR(10)  ,
        TA200268015 VARCHAR(10)  ,
        TA200268016 VARCHAR(10)  ,
        TA200268017 VARCHAR(10)  ,
        TA200268018 VARCHAR(10)  ,
        TA200268019 VARCHAR(10)  ,
        TA200268020 VARCHAR(10)  ,
        TA200268021 VARCHAR(10)  ,
        TA200268022 VARCHAR(10)  ,
        TA200268023 VARCHAR(10)  ,
        TA200268024 VARCHAR(1)  ,
        TA200268A01 VARCHAR(5)  ,
        TA200268A02 VARCHAR(5)  ,
        TA200268A03 VARCHAR(5)  ,
        TA200268A04 VARCHAR(5)  ,
        TA200268A05 VARCHAR(5)  ,
        TA200268A06 VARCHAR(5)  ,
        TA200268A07 VARCHAR(5)  ,
        TA200268A08 VARCHAR(5)  ,
        TA200268A09 VARCHAR(5)  ,
        TA200268A10 VARCHAR(5)  ,
        TA200268A11 VARCHAR(5)  ,
        TA200268A12 VARCHAR(5)  ,
        TA200268A13 VARCHAR(5)  ,
        TA200268A14 VARCHAR(5)  ,
        TA200268A15 VARCHAR(5)  ,
        TA200268A16 VARCHAR(5)  ,
        TA200268A17 VARCHAR(5)  ,
        TA200268A18 VARCHAR(5)  ,
        TA200268A19 VARCHAR(5)  ,
        TA200268A20 VARCHAR(5)  ,
        TA200268025 VARCHAR(1)  ,
        TA200268026 VARCHAR(5)  ,
        TA200268027 VARCHAR(20)  ,
        TA200268028 VARCHAR(50)  ,
        TA200268029 DECIMAL(5,2) ,
        TA200268030 DECIMAL(5,2) ,
        TA200268031 DECIMAL(5,2) ,
        TA200268034 VARCHAR(3)  ,
        TA200268035 VARCHAR(14)  ,
        TA200268036 VARCHAR(500)  ,
        TA200268037 VARCHAR(140)  ,
        TA200268038 VARCHAR(20)  ,
        TA200268039 VARCHAR(30)  ,
        TA200268040 VARCHAR(50)  ,
        TA200268041 VARCHAR(1)  ,
        TA200268042 VARCHAR(50)  ,
        TA200268043 VARCHAR(1)  ,
        TA200268044 VARCHAR(1)  ,
        TA200268045 VARCHAR(10)  ,
        TA200268046 VARCHAR(1)  ,
        TA200268047 VARCHAR(17)  ,
        TA200268048 VARCHAR(1)  ,
        TA200268049 VARCHAR(5)  ,
        TA200268050 VARCHAR(1)  ,
        TA200268051 VARCHAR(60)  ,
        Etl_First_Dt DATE   NOT NULL,
        Etl_Tx_Dt DATE   NOT NULL,
        Record_Del_Dt DATE   NOT NULL)
  DISTRIBUTE BY HASH(TA200268001);
  
  CREATE TABLE EDIODS.ED2_PBM_C_BRANCH
       (
        PARENT_STRU_ID VARCHAR(10)  NOT NULL,
        STRU_ID VARCHAR(10)  NOT NULL,
        ZONE_ID char(5)  NOT NULL,
        BRCH_ID char(5)  NOT NULL,
        STRU_LEVEL VARCHAR(3)  NOT NULL,
        STRU_STATUS DECIMAL(1,0)  NOT NULL,
        STRU_NAME VARCHAR(100)  NOT NULL,
        STRU_SHORTNAME VARCHAR(60)  ,
        STRU_ADDRESS VARCHAR(100)  ,
        STRU_POSTCODE VARCHAR(20)  ,
        STRU_CTUSER VARCHAR(10)  ,
        STRU_PHONE VARCHAR(30)  ,
        STRU_SIGN VARCHAR(3)  ,
        MANAGE_GRADE VARCHAR(3)  ,
        NODE_TYPE VARCHAR(3)  ,
        OPER_TYPE VARCHAR(3)  ,
        SPEC_MASK VARCHAR(10)  NOT NULL,
        MDF_USER VARCHAR(10)  ,
        MDF_TIME VARCHAR(10)  NOT NULL,
        CRT_TIME VARCHAR(10)  NOT NULL,
        DATA_DATE VARCHAR(10)  NOT NULL,
        Etl_First_Dt DATE   NOT NULL,
        Etl_Tx_Dt DATE   NOT NULL,
        Record_Del_Dt DATE   NOT NULL)
  DISTRIBUTE BY HASH(STRU_ID);
  
  CREATE TABLE EDIODS.ED2_PBM_C_STRU_NOVA_REL
       (
        STRU_ID VARCHAR(10)  NOT NULL,
        ZONE_ID char(5)  NOT NULL,
        BRCH_ID char(5)  NOT NULL,
        SPEC_ID VARCHAR(10)  NOT NULL,
        OPTYPE VARCHAR(3)  ,
        MDF_USER VARCHAR(10)  ,
        MDF_DATE VARCHAR(10)  NOT NULL,
        DATA_DATE VARCHAR(10)  NOT NULL,
        Etl_First_Dt DATE   NOT NULL,
        Etl_Tx_Dt DATE   NOT NULL,
        Record_Del_Dt DATE   NOT NULL)
  DISTRIBUTE BY HASH(STRU_ID);