CREATE TABLE CIR_INV_TBS
(
  CIRCUIT_DESIGN_ID            NUMBER(9)        NOT NULL,
  CIRCUIT_STATUS               VARCHAR2(50 BYTE),
  CIRCUIT_STATUS_2             VARCHAR2(50 BYTE),
  CIRCUIT_STATUS_UPDATE_DATE   DATE,
  MARKET                       VARCHAR2(255 BYTE),
  A_LATA                       VARCHAR2(5 BYTE),
  Z_LATA                       VARCHAR2(5 BYTE),
  LSO                          VARCHAR2(50 BYTE),
  EXCHANGE_CARRIER_CIRCUIT_ID  VARCHAR2(100 BYTE),
  A_CLLI_CODE                  VARCHAR2(11 BYTE),
  Z_CLLI_CODE                  VARCHAR2(11 BYTE),
  CUSTOMER_NAME                VARCHAR2(100 BYTE),
  CUST_ACCT_ID                 NUMBER(9),
  CUST_ACCT_NBR                VARCHAR2(20 BYTE),
  CUST_SERVICE_ADDRESS         VARCHAR2(200 BYTE),
  CUST_SERVICE_CITY            VARCHAR2(60 BYTE),
  CUST_SERVICE_STATE           VARCHAR2(60 BYTE),
  POSTAL_CODE                  VARCHAR2(20 BYTE),
  RATE_CODE                    VARCHAR2(10 BYTE),
  XO_SWITCH_TYPE               VARCHAR2(50 BYTE),
  PRODUCT                      VARCHAR2(100 BYTE),
  INSTALL_ORDER_DATE           DATE,
  INSTALL_FOC_DATE             DATE,
  DISCO_ORDER_DATE             DATE,
  DISCO_COMPLETE_DATE          DATE,
  MOVE_ORDER_DATE              DATE,
  MOVE_COMPLETE_DATE           DATE,
  CHANGE_ORDER_DATE            DATE,
  CHANGE_COMPLETE_DATE         DATE,
  VTA                          VARCHAR2(35 BYTE),
  TERM_START_DATE              DATE,
  LINE_OF_BUSINESS             VARCHAR2(50 BYTE),
  SALES_MARKET                 VARCHAR2(50 BYTE),
  CIRCUIT_DESIGNATION          VARCHAR2(40 BYTE),
  PSR_NUMBER                   NUMBER(9),
  LINX_SALES_ORDER_ID          VARCHAR2(20 BYTE),
  VPI_CIRCUIT_DESIGNATION      VARCHAR2(20 BYTE),
  RECORD_LOAD_DATE             DATE,
  TEST_TURN_UP_COMPLETE_DATE   DATE,
  LINX_SALES_CHANNEL           VARCHAR2(50 BYTE),
  LINX_INSTALL_MARKET          VARCHAR2(30 BYTE),
  TRANSMISSION_RATE_QUANTITY   VARCHAR2(50 BYTE),
  TRANS_RATE_UNIT_OF_MEASURE   VARCHAR2(10 BYTE),
  TYPE                         VARCHAR2(1 BYTE),
  SERVICE_TYPE                 VARCHAR2(40 BYTE),
  XO_ORDER_PLATFORM            VARCHAR2(20 BYTE)
)
TABLESPACE INFO_DAT_03
PCTUSED    90
PCTFREE    5
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          10M
            NEXT             10M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        2
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOLOGGING 
NOCOMPRESS 
NOCACHE
NOPARALLEL
MONITORING;

CREATE INDEX CIT_LINX_SALES_ORDER_ID ON CIR_INV_TBS
(LINX_SALES_ORDER_ID)
LOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX CIT_CIR_DESIGN ON CIR_INV_TBS
(CIRCUIT_DESIGNATION)
LOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX CIT_PRODUCT ON CIR_INV_TBS
(PRODUCT)
LOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX CIT_CUST_POST_CODE ON CIR_INV_TBS
(POSTAL_CODE)
LOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX CIT_CUST_SVC_STATE ON CIR_INV_TBS
(CUST_SERVICE_STATE)
LOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX CIT_CUST_SVC_CITY ON CIR_INV_TBS
(CUST_SERVICE_CITY)
LOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX CIT_CUST_SVC_ADDRESS ON CIR_INV_TBS
(CUST_SERVICE_ADDRESS)
NOLOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX CIT_CUST_NAME ON CIR_INV_TBS
(CUSTOMER_NAME)
NOLOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX CIT_RATE_CODE ON CIR_INV_TBS
(RATE_CODE)
NOLOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX CIT_CIRCUIT_STATUS ON CIR_INV_TBS
(CIRCUIT_STATUS)
NOLOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX CIT_MARKET ON CIR_INV_TBS
(MARKET)
NOLOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE BITMAP INDEX CI_INV_TBS_LOB_IND ON CIR_INV_TBS
(LINE_OF_BUSINESS)
NOLOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX CIR_INV_TBS_IDX02 ON CIR_INV_TBS
(Z_CLLI_CODE)
NOLOGGING
TABLESPACE INFO_DAT_03
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          10M
            NEXT             10M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE INDEX CIR_INV_TBS_IDX03 ON CIR_INV_TBS
(RECORD_LOAD_DATE)
LOGGING
TABLESPACE INFO_DATA
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

CREATE UNIQUE INDEX CIR_INV_TBS_IDXPK ON CIR_INV_TBS
(CIRCUIT_DESIGN_ID)
NOLOGGING
TABLESPACE INFO_DAT_03
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          10M
            NEXT             10M
            MINEXTENTS       1
            MAXEXTENTS       2147483645
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

ALTER TABLE CIR_INV_TBS ADD (
  CONSTRAINT CIR_INV_TBS_IDXPK
 PRIMARY KEY
 (CIRCUIT_DESIGN_ID)
    USING INDEX 
    TABLESPACE INFO_DAT_03
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    STORAGE    (
                INITIAL          10M
                NEXT             10M
                MINEXTENTS       1
                MAXEXTENTS       2147483645
                PCTINCREASE      0
                FREELISTS        1
                FREELIST GROUPS  1
               ));

GRANT SELECT ON  CIR_INV_TBS TO INFOSTORE_REPORT;