     ADD CONSTRAINT KREW_DOC_HDR_EXT_TP1
 PRIMARY KEY (DOC_HDR_EXT_ID)
 /
-CREATE INDEX KREW_DOC_HDR_EXT_TI1
-  ON KREW_DOC_HDR_EXT_T
+CREATE INDEX KREW_DOC_HDR_EXT_TI1 
+  ON KREW_DOC_HDR_EXT_T 
   (KEY_CD, VAL)
 /
-CREATE INDEX KREW_DOC_HDR_EXT_TI2
-  ON KREW_DOC_HDR_EXT_T
+CREATE INDEX KREW_DOC_HDR_EXT_TI2 
+  ON KREW_DOC_HDR_EXT_T 
   (DOC_HDR_ID)
 /
-CREATE INDEX KREW_DOC_HDR_EXT_TI3
-  ON KREW_DOC_HDR_EXT_T
+CREATE INDEX KREW_DOC_HDR_EXT_TI3 
+  ON KREW_DOC_HDR_EXT_T 
   (VAL)
 /
 INSERT INTO KREW_DOC_HDR_EXT_T
 (DOC_HDR_EXT_ID, DOC_HDR_ID, KEY_CD, VAL)
-SELECT
+SELECT 
 CAST(DOC_HDR_EXT_ID as VARCHAR2(40)), DOC_HDR_ID, KEY_CD, VAL
 FROM TEMP_KREW_DOC_HDR_EXT_T
 /

    ADD CONSTRAINT KREW_DOC_TYP_PROC_TP1
PRIMARY KEY (DOC_TYP_PROC_ID)
/
CREATE INDEX KREW_DOC_TYP_PROC_TI1
  ON KREW_DOC_TYP_PROC_T
  (DOC_TYP_ID)
/
CREATE INDEX KREW_DOC_TYP_PROC_TI2
  ON KREW_DOC_TYP_PROC_T
  (INIT_RTE_NODE_ID)
/
CREATE INDEX KREW_DOC_TYP_PROC_TI3
  ON KREW_DOC_TYP_PROC_T
  (NM)
/
INSERT INTO KREW_DOC_TYP_PROC_T
(DOC_TYP_PROC_ID, DOC_TYP_ID, INIT_RTE_NODE_ID, NM, INIT_IND, VER_NBR)
SELECT
CAST(DOC_TYP_PROC_ID as VARCHAR2(40)), CAST(DOC_TYP_ID as VARCHAR2(40)), INIT_RTE_NODE_ID,
NM, INIT_IND, VER_NBR
FROM TEMP_KREW_DOC_TYP_PROC_T
/

        , DLGN_RULE_TMPL_ID VARCHAR2(40)
        , VER_NBR NUMBER(8) default 0
        , OBJ_ID VARCHAR2(36) NOT NULL
    
    , CONSTRAINT KREW_RULE_TMPL_TC0 UNIQUE (OBJ_ID)
    , CONSTRAINT KREW_RULE_TMPL_TI1 UNIQUE (NM)
)
