--THIS FILE IS NEEDED ONLY FOR THE ONLINE UPDATE OR WHEN UPGRADING FROM VERSION 8.8.4.12!!!

/************************************************************************************************************************
*
*
*  Date: June 25, 2012  13:13:13
*
*  This upgrade script was automatically generated by DBDiff for Oracle (www.dbdiff.com)
*
*  SOURCE DATABASE:  VERSION_8_9_0@AMD64
*  TARGET DATABASE:  VERSION_8_8_4@AMD64
*
*  This script should be executed as VERSION_8_8_4 in database VERSION_8_8_4@AMD64 except where otherwise noted.
*
*  IMPORTANT:  As with any script, you should always perform a sanity check before executing it in your target database.
*
*
************************************************************************************************************************/




/************************************************************************************************************************
*
*  sequences
*
*  The following statements will upgrade the sequences
*
************************************************************************************************************************/

CREATE SEQUENCE SEQ_FPLD INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_FPLI INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_FPLS INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_SERB_FISCAL INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_SFOR INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_W8HP INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_WDWI INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_WDWU INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_WERS INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_WLOR INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_WNAR INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_WOIP INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_WSFS INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_XOPC INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_XOPD INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_XOPL INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_XOPP INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_XOPS INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_XOPT INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_XPHN INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YBLW INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YCRL INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YCRS INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YHRI INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YOPF INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YOPR INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YRAA INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YRDB INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YRDL INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YRDU INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YRLH INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YRSL INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YSFL INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YSFT INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YSRC INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YTRR INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_ZCNR INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YRFR INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_XCNL INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_WDEC INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_XSST INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_WRPX INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_WFMS INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_WAMT INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_YOPL INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

CREATE SEQUENCE SEQ_XCHS INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;


/************************************************************************************************************************
*
*  tables
*
*  907 tables were found in VERSION_8_9_0@AMD64
*  871 tables were found in VERSION_8_8_4@AMD64
*
************************************************************************************************************************/




/************************************************************************************************************************
*
*  The following statements will drop tables that DO NOT exist in VERSION_8_9_0@AMD64
*
************************************************************************************************************************/


DROP TABLE VERSION_8_8_4_12;


/************************************************************************************************************************
*
*  The following statements will drop Views that DO NOT exist in VERSION_8_9_0@AMD64
*
************************************************************************************************************************/


DROP VIEW V8_ED_CCM_YEMN_YEMN;


/************************************************************************************************************************
*
*  The following statements will create tables that DO NOT exist in VERSION_8_8_4@AMD64
*
************************************************************************************************************************/


/*  FPLD  */
CREATE TABLE FPLD (
	 FPLD_ID	NUMBER(30)	NOT NULL
	,FPLD_SHORTDESC	VARCHAR2(3)	NOT NULL
	,FPLD_LONGDESC	VARCHAR2(30)	NOT NULL
	,FPLD_DISPLAYORDER	NUMBER(5)	NOT NULL
	,FPLD_ROLE	NUMBER(1)	NOT NULL
	,FPLD_INACTIVE	NUMBER(1)	    NULL
	,FPLD_VALIDFROM	DATE	    NULL
	,FPLD_VALIDUNTIL	DATE	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE FPLD ADD (
	CONSTRAINT FPLD_PK
	PRIMARY KEY
	            (
	             FPLD_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  FPLS  */
CREATE TABLE FPLS (
	 FPLS_ID	NUMBER(30)	NOT NULL
	,FPLS_FPLD_ID	NUMBER(30)	NOT NULL
	,FPLS_YOUT_ID	NUMBER(30)	    NULL
	,FPLS_YSME_ID	NUMBER(30)	    NULL
	,FPLS_PRICE	NUMBER(30,4)	NOT NULL
	,FPLS_EXCLUDE	NUMBER(1)	    NULL
	,FPLS_FLEX	NUMBER(1)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE FPLS ADD (
	CONSTRAINT FPLS_PK
	PRIMARY KEY
	            (
	             FPLS_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX FPLS_FPLD_ID ON FPLS
	(
	  FPLS_FPLD_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX FPLS_YOUT_ID ON FPLS
	(
	  FPLS_YOUT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX FPLS_YSME_ID ON FPLS
	(
	  FPLS_YSME_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  SFOR  */
CREATE TABLE SFOR (
	 SFOR_ID	NUMBER(30)	NOT NULL
	,SFOR_DATE	DATE	NOT NULL
	,SFOR_YRES_ID	NUMBER(30)	    NULL
	,SFOR_ZFAC_ID	NUMBER(30)	    NULL
	,SFOR_YDET_ID	NUMBER(30)	    NULL
	,SFOR_YRES_ACTARRTIME	DATE	    NULL
	,SFOR_YRES_ACTDEPTIME	DATE	    NULL
	,SFOR_YRES_EXPARRTIME	DATE	    NULL
	,SFOR_YRES_EXPDEPTIME	DATE	    NULL
	,SFOR_YRES_RESSTATUS	NUMBER(1)	    NULL
	,SFOR_YRES_NOAVAILREASON	NUMBER(1)	    NULL
	,SFOR_XCMS_ID	NUMBER(30)	    NULL
	,SFOR_GUESTNAME	VARCHAR2(35)	    NULL
	,SFOR_YCLN_1_XCMS_ID	NUMBER(30)	    NULL
	,SFOR_COMPANYNAME	VARCHAR2(35)	    NULL
	,SFOR_YCLN_2_XCMS_ID	NUMBER(30)	    NULL
	,SFOR_TAGENTNAME	VARCHAR2(35)	    NULL
	,SFOR_YCLN_3_XCMS_ID	NUMBER(30)	    NULL
	,SFOR_SOURCENAME	VARCHAR2(35)	    NULL
	,SFOR_YCLN_4_XCMS_ID	NUMBER(30)	    NULL
	,SFOR_INDINAME	VARCHAR2(35)	    NULL
	,SFOR_YCLN_5_XCMS_ID	NUMBER(30)	    NULL
	,SFOR_VENDNAME	VARCHAR2(35)	    NULL
	,SFOR_YCLN_6_XCMS_ID	NUMBER(30)	    NULL
	,SFOR_MPLANNAME	VARCHAR2(35)	    NULL
	,SFOR_YCLN_7_XCMS_ID	NUMBER(30)	    NULL
	,SFOR_BOOKERNAME	VARCHAR2(35)	    NULL
	,SFOR_YDET_YGRP_ID	NUMBER(30)	    NULL
	,SFOR_GROUPNAME	VARCHAR2(30)	    NULL
	,SFOR_YBLH_ID	NUMBER(30)	    NULL
	,SFOR_YBLH_SHORTDESC	VARCHAR2(10)	    NULL
	,SFOR_YDET_YRMS_ID	NUMBER(30)	    NULL
	,SFOR_YRMS_SHORTDESC	VARCHAR2(10)	    NULL
	,SFOR_YDET_YCAT_ID	NUMBER(30)	    NULL
	,SFOR_YCAT_SHORTDESC	VARCHAR2(5)	    NULL
	,SFOR_YDET_YRCH_ID	NUMBER(30)	    NULL
	,SFOR_YRCH_SHORTDESC	VARCHAR2(10)	    NULL
	,SFOR_YDET_XCMA_ID	NUMBER(30)	    NULL
	,SFOR_XCMA_SHORTDESC	VARCHAR2(3)	    NULL
	,SFOR_SOURCE_ID	NUMBER(30)	    NULL
	,SFOR_SOURCE	VARCHAR2(30)	    NULL
	,SFOR_CHANNEL_ID	NUMBER(30)	    NULL
	,SFOR_CHANNEL	VARCHAR2(30)	    NULL
	,SFOR_YDET_ADULTNO	NUMBER(3)	    NULL
	,SFOR_YDET_SHARENUM	NUMBER(30)	    NULL
	,SFOR_TOTALYRGL_NUMBER	NUMBER(30,4)	    NULL
	,SFOR_GROSSROOMREV	NUMBER(30,4)	    NULL
	,SFOR_NETROOMREV	NUMBER(30,4)	    NULL
	,SFOR_GROSSFBREV	NUMBER(30,4)	    NULL
	,SFOR_NETFBREV	NUMBER(30,4)	    NULL
	,SFOR_GROSSMINIBARREV	NUMBER(30,4)	    NULL
	,SFOR_NETMINIBARREV	NUMBER(30,4)	    NULL
	,SFOR_GROSSTELEREV	NUMBER(30,4)	    NULL
	,SFOR_NETTELEREV	NUMBER(30,4)	    NULL
	,SFOR_GROSSMISCREV	NUMBER(30,4)	    NULL
	,SFOR_NETMISCREV	NUMBER(30,4)	    NULL
	,SFOR_NETREV	NUMBER(30,4)	    NULL
	,SFOR_GROSSREV	NUMBER(30,4)	    NULL
	,SFOR_ARR_ID	NUMBER(1)	    NULL
	,SFOR_DEP_ID	NUMBER(1)	    NULL
	,SFOR_YDET_NOOFROOMS	NUMBER(3)	    NULL
	,SFOR_XCOU_ID	NUMBER(30)	    NULL
	,SFOR_HOTELCODE	VARCHAR2(5)	    NULL
	,SFOR_WPHS_ID	NUMBER(30)	    NULL
	,SFOR_PARTNER_ID	NUMBER(30)	    NULL
	,SFOR_IMPORTED	NUMBER(1)	    NULL
	,SFOR_YRCH_COMPSTATUS	NUMBER(1)	    NULL
	,SFOR_VIPCODE	VARCHAR2(3)	    NULL
	,SFOR_VIPCODE_LONGDESC	VARCHAR2(30)	    NULL
	,SFOR_YBOM_ID	NUMBER(30)	    NULL
	,SFOR_XSTA_ID	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE SFOR ADD (
	CONSTRAINT SFOR_PK
	PRIMARY KEY
	            (
	             SFOR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX SFOR_ARR_ID ON SFOR
	(
	  SFOR_ARR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_CHANNEL_ID ON SFOR
	(
	  SFOR_CHANNEL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_DEP_ID ON SFOR
	(
	  SFOR_DEP_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_PARTNER_ID ON SFOR
	(
	  SFOR_PARTNER_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_SOURCE_ID ON SFOR
	(
	  SFOR_SOURCE_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_WPHS_ID ON SFOR
	(
	  SFOR_WPHS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_XCMS_ID ON SFOR
	(
	  SFOR_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_XCOU_ID ON SFOR
	(
	  SFOR_XCOU_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_XSTA_ID ON SFOR
	(
	  SFOR_XSTA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YBLH_ID ON SFOR
	(
	  SFOR_YBLH_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YBOM_ID ON SFOR
	(
	  SFOR_YBOM_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YCLN_1_XCMS_ID ON SFOR
	(
	  SFOR_YCLN_1_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YCLN_2_XCMS_ID ON SFOR
	(
	  SFOR_YCLN_2_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YCLN_3_XCMS_ID ON SFOR
	(
	  SFOR_YCLN_3_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YCLN_4_XCMS_ID ON SFOR
	(
	  SFOR_YCLN_4_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YCLN_5_XCMS_ID ON SFOR
	(
	  SFOR_YCLN_5_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YCLN_6_XCMS_ID ON SFOR
	(
	  SFOR_YCLN_6_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YCLN_7_XCMS_ID ON SFOR
	(
	  SFOR_YCLN_7_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YDET_ID ON SFOR
	(
	  SFOR_YDET_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YDET_XCMA_ID ON SFOR
	(
	  SFOR_YDET_XCMA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YDET_YCAT_ID ON SFOR
	(
	  SFOR_YDET_YCAT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YDET_YGRP_ID ON SFOR
	(
	  SFOR_YDET_YGRP_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YDET_YRCH_ID ON SFOR
	(
	  SFOR_YDET_YRCH_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YDET_YRMS_ID ON SFOR
	(
	  SFOR_YDET_YRMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_YRES_ID ON SFOR
	(
	  SFOR_YRES_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SFOR_ZFAC_ID ON SFOR
	(
	  SFOR_ZFAC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  VERSION_8_9_0_0  */
CREATE TABLE VERSION_8_9_0_0 (
	 DUMMY	NUMBER	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;


/*  W8HP  */
CREATE TABLE W8HP (
	 W8HP_ID	NUMBER(30)	NOT NULL
	,W8HP_URLTEXT	VARCHAR2(200)	    NULL
	,W8HP_QUESTIONNAIRETEXT	VARCHAR2(2000)	    NULL
	,W8HP_TABRESMAXPAX	NUMBER(2)	    NULL
	,W8HP_XPDA_ID	NUMBER(30)	    NULL
	,W8HP_CCM_WRPT_ID	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE W8HP ADD (
	CONSTRAINT W8HP_PK
	PRIMARY KEY
	            (
	             W8HP_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX W8HP_CCM_WRPT_ID ON W8HP
	(
	  W8HP_CCM_WRPT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX W8HP_XPDA_ID ON W8HP
	(
	  W8HP_XPDA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WDWI  */
CREATE TABLE WDWI (
	 WDWI_ID	NUMBER(30)	NOT NULL
	,WDWI_NAME	VARCHAR2(50)	NOT NULL
	,WDWI_DESCRIPTION	VARCHAR2(200)	    NULL
	,WDWI_INACTIVE	NUMBER(1)	    NULL
	,WDWI_LEFT	NUMBER(30)	    NULL
	,WDWI_TOP	NUMBER(30)	    NULL
	,WDWI_HEIGHT	NUMBER(30)	    NULL
	,WDWI_WIDTH	NUMBER(30)	    NULL
	,WDWI_URL	VARCHAR2(250)	NOT NULL
	,WDWI_DISPLORDER	NUMBER(10)	    NULL
	,WDWI_HIDDEN	NUMBER(1)	    NULL
	,WDWI_CONTENT	NCLOB	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WDWI ADD (
	CONSTRAINT WDWI_PK
	PRIMARY KEY
	            (
	             WDWI_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WDWI_DISPLORDER ON WDWI
	(
	  WDWI_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WDWU  */
CREATE TABLE WDWU (
	 WDWU_ID	NUMBER(30)	NOT NULL
	,WDWU_XCED_ID	NUMBER(30)	NOT NULL
	,WDWU_NAME	VARCHAR2(100)	    NULL
	,WDWU_WDWI_ID	NUMBER(30)	NOT NULL
	,WDWU_TOP	NUMBER(30)	NOT NULL
	,WDWU_LEFT	NUMBER(30)	NOT NULL
	,WDWU_HEIGHT	NUMBER(30)	NOT NULL
	,WDWU_WIDTH	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WDWU ADD (
	CONSTRAINT WDWU_PK
	PRIMARY KEY
	            (
	             WDWU_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WDWU_WDWI_ID ON WDWU
	(
	  WDWU_WDWI_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX WDWU_XCED_ID ON WDWU
	(
	  WDWU_XCED_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WERS  */
CREATE TABLE WERS (
	 WERS_ID	NUMBER(30)	NOT NULL
	,WERS_TEXT	VARCHAR2(60)	NOT NULL
	,WERS_DISPLORDER	NUMBER(3)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WERS ADD (
	CONSTRAINT WERS_PK
	PRIMARY KEY
	            (
	             WERS_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
ALTER TABLE WERS ADD (
	CONSTRAINT WERS_TEXT
	UNIQUE
	       (
	        WERS_TEXT
	       )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WERS_DISPLORDER ON WERS
	(
	  WERS_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WLOR  */
CREATE TABLE WLOR (
	 WLOR_ID	NUMBER(30)	NOT NULL
	,WLOR_WLOP_ID	NUMBER(30)	NOT NULL
	,WLOR_YRES_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WLOR ADD (
	CONSTRAINT WLOR_PK
	PRIMARY KEY
	            (
	             WLOR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WLOR_WLOP_ID ON WLOR
	(
	  WLOR_WLOP_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX WLOR_YRES_ID ON WLOR
	(
	  WLOR_YRES_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WNAR  */
CREATE TABLE WNAR (
	 WNAR_ID	NUMBER(30)	NOT NULL
	,WNAR_WRPT_ID	NUMBER(30)	NOT NULL
	,WNAR_TIMESTAMP	DATE	NOT NULL
	,WNAR_SYSDATE	DATE	NOT NULL
	,WNAR_REPORT	LONG RAW	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8LARGE
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WNAR ADD (
	CONSTRAINT WNAR_PK
	PRIMARY KEY
	            (
	             WNAR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WNAR_WRPT_ID ON WNAR
	(
	  WNAR_WRPT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WOIP  */
CREATE TABLE WOIP (
	 WOIP_ID	NUMBER(30)	NOT NULL
	,WOIP_SOURCETABLENAME	VARCHAR2(20)	NOT NULL
	,WOIP_SOURCEID	NUMBER(30)	NOT NULL
	,WOIP_STATUS	NUMBER(1)	NOT NULL
	,WOIP_LASTSTATUSCHANGE	DATE	NOT NULL
	,WOIP_TAG	VARCHAR2(30)	NOT NULL
	,WOIP_DESCRIPTION	VARCHAR2(500)	NOT NULL
	,WOIP_COMMENT	VARCHAR2(200)	    NULL
	,WOIP_ERRORLOG	VARCHAR2(2000)	    NULL
	,WOIP_V8ID	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WOIP ADD (
	CONSTRAINT WOIP_PK
	PRIMARY KEY
	            (
	             WOIP_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  WSFS  */
CREATE TABLE WSFS (
	 WSFS_ID	NUMBER(30)	NOT NULL
	,WSFS_TABLE_NAME	VARCHAR2(4)	NOT NULL
	,WSFS_TABLE_ID	NUMBER(30)	NOT NULL
	,WSFS_SYNC_DATE	DATE	    NULL
	,WSFS_SF_ID	VARCHAR2(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WSFS ADD (
	CONSTRAINT WSFS_PK
	PRIMARY KEY
	            (
	             WSFS_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WSFS_SF_ID ON WSFS
	(
	  WSFS_SF_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX WSFS_TABLE_ID ON WSFS
	(
	  WSFS_TABLE_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XOPC  */
CREATE TABLE XOPC (
	 XOPC_ID	NUMBER(30)	NOT NULL
	,XOPC_SHORTDESC	VARCHAR2(3)	    NULL
	,XOPC_LONGDESC	VARCHAR2(30)	NOT NULL
	,XOPC_SF_ID	VARCHAR2(30)	    NULL
	,XOPC_DISPLORDER	NUMBER(3)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XOPC ADD (
	CONSTRAINT XOPC_PK
	PRIMARY KEY
	            (
	             XOPC_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XOPC_DISPLORDER ON XOPC
	(
	  XOPC_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XOPC_SF_ID ON XOPC
	(
	  XOPC_SF_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XOPD  */
CREATE TABLE XOPD (
	 XOPD_ID	NUMBER(30)	NOT NULL
	,XOPD_SHORTDESC	VARCHAR2(3)	    NULL
	,XOPD_LONGDESC	VARCHAR2(30)	NOT NULL
	,XOPD_DISPLORDER	NUMBER(3)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XOPD ADD (
	CONSTRAINT XOPD_PK
	PRIMARY KEY
	            (
	             XOPD_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XOPD_DISPLORDER ON XOPD
	(
	  XOPD_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XOPL  */
CREATE TABLE XOPL (
	 XOPL_ID	NUMBER(30)	NOT NULL
	,XOPL_SHORTDESC	VARCHAR2(3)	    NULL
	,XOPL_LONGDESC	VARCHAR2(30)	NOT NULL
	,XOPL_DISPLORDER	NUMBER(3)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XOPL ADD (
	CONSTRAINT XOPL_PK
	PRIMARY KEY
	            (
	             XOPL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XOPL_DISPLORDER ON XOPL
	(
	  XOPL_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XOPS  */
CREATE TABLE XOPS (
	 XOPS_ID	NUMBER(30)	NOT NULL
	,XOPS_SHORTDESC	VARCHAR2(3)	    NULL
	,XOPS_LONGDESC	VARCHAR2(30)	NOT NULL
	,XOPS_DISPLORDER	NUMBER(3)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XOPS ADD (
	CONSTRAINT XOPS_PK
	PRIMARY KEY
	            (
	             XOPS_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XOPS_DISPLORDER ON XOPS
	(
	  XOPS_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XOPT  */
CREATE TABLE XOPT (
	 XOPT_ID	NUMBER(30)	NOT NULL
	,XOPT_SHORTDESC	VARCHAR2(3)	    NULL
	,XOPT_LONGDESC	VARCHAR2(30)	NOT NULL
	,XOPT_CLOSEDAYS	NUMBER(3)	    NULL
	,XOPT_DISPLORDER	NUMBER(3)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XOPT ADD (
	CONSTRAINT XOPT_PK
	PRIMARY KEY
	            (
	             XOPT_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XOPT_DISPLORDER ON XOPT
	(
	  XOPT_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XPHN  */
CREATE TABLE XPHN (
	 XPHN_ID	NUMBER(30)	NOT NULL
	,XPHN_XCMS_ID	NUMBER(30)	NOT NULL
	,XPHN_PHONENUMBER	VARCHAR2(30)	NOT NULL
	,XPHN_CALLTIME	DATE	    NULL
	,XPHN_INCOMING	NUMBER(1)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XPHN ADD (
	CONSTRAINT XPHN_PK
	PRIMARY KEY
	            (
	             XPHN_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XPHN_XCMS_ID ON XPHN
	(
	  XPHN_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YBLW  */
CREATE TABLE YBLW (
	 YBLW_ID	NUMBER(30)	NOT NULL
	,YBLW_YBLH_ID	NUMBER(30)	NOT NULL
	,YBLW_XCMS_ID	NUMBER(30)	NOT NULL
	,YBLW_STARTDATE	DATE	    NULL
	,YBLW_ENDDATE	DATE	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YBLW ADD (
	CONSTRAINT YBLW_PK
	PRIMARY KEY
	            (
	             YBLW_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YBLW_XCMS_ID ON YBLW
	(
	  YBLW_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YBLW_YBLH_ID ON YBLW
	(
	  YBLW_YBLH_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YCRL  */
CREATE TABLE YCRL (
	 YCRL_ID	NUMBER(30)	NOT NULL
	,YCRL_YRMS_ID	NUMBER(30)	NOT NULL
	,YCRL_DAY	DATE	NOT NULL
	,YCRL_TIMESTAMP	DATE	NOT NULL
	,YCRL_ORIGIN	NUMBER(1)	NOT NULL
	,YCRL_RESGLOBALID	VARCHAR2(60)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YCRL ADD (
	CONSTRAINT YCRL_PK
	PRIMARY KEY
	            (
	             YCRL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
ALTER TABLE YCRL ADD (
	CONSTRAINT YCRL_LOCK
	UNIQUE
	       (
	        YCRL_YRMS_ID
	       ,YCRL_DAY
	       )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YCRL_TIMESTAMP ON YCRL
	(
	  YCRL_TIMESTAMP
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YCRL_YRMS_ID ON YCRL
	(
	  YCRL_YRMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YCRS  */
CREATE TABLE YCRS (
	 YCRS_TABLEID	NUMBER(30)	NOT NULL
	,YCRS_TABLENAME	VARCHAR2(4)	NOT NULL
	,YCRS_GLOBALID	VARCHAR2(60)	    NULL
	,YCRS_OWNED	NUMBER(1)	NOT NULL
	,YCRS_LOCALTIMESTAMP	DATE	    NULL
	,YCRS_LOCALHASH	VARCHAR2(32)	    NULL
	,YCRS_HASHMISMATCH	DATE	    NULL
	,YCRS_TRANSFERERROR	DATE	    NULL
	,YCRS_ERRORTEXT	VARCHAR2(1000)	    NULL
	,YCRS_MODIFIEDWITHOUTOWNED	NUMBER(1)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YCRS ADD (
	CONSTRAINT YCRS_PK
	PRIMARY KEY
	            (
	             YCRS_TABLEID
	            ,YCRS_TABLENAME
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  YHRI  */
CREATE TABLE YHRI (
	 YHRI_ID	NUMBER(30)	NOT NULL
	,YHRI_ARRDATE	DATE	NOT NULL
	,YHRI_MAXSOLD	NUMBER(10)	NOT NULL
	,YHRI_ROOMSOLD	NUMBER(10)	    NULL
	,YHRI_CEILING	NUMBER(10)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YHRI ADD (
	CONSTRAINT YHRI_PK
	PRIMARY KEY
	            (
	             YHRI_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  YOPF  */
CREATE TABLE YOPF (
	 YOPF_ID	NUMBER(30)	NOT NULL
	,YOPF_YSFT_ID	NUMBER(30)	NOT NULL
	,YOPF_XOPP_ID	NUMBER(30)	NOT NULL
	,YOPF_FROMDATE	DATE	NOT NULL
	,YOPF_TODATE	DATE	NOT NULL
	,YOPF_NOOFFS	NUMBER(3)	NOT NULL
	,YOPF_PAX	NUMBER(3)	NOT NULL
	,YOPF_COFFEE	NUMBER(1)	    NULL
	,YOPF_LUNCH	NUMBER(1)	    NULL
	,YOPF_DINNER	NUMBER(1)	    NULL
	,YOPF_NOTES	VARCHAR2(1000)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YOPF ADD (
	CONSTRAINT YOPF_PK
	PRIMARY KEY
	            (
	             YOPF_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YOPF_XOPP_ID ON YOPF
	(
	  YOPF_XOPP_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YOPF_YSFT_ID ON YOPF
	(
	  YOPF_YSFT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YOPR  */
CREATE TABLE YOPR (
	 YOPR_ID	NUMBER(30)	NOT NULL
	,YOPR_YSRC_ID	NUMBER(30)	NOT NULL
	,YOPR_XOPP_ID	NUMBER(30)	NOT NULL
	,YOPR_FROMDATE	DATE	NOT NULL
	,YOPR_TODATE	DATE	NOT NULL
	,YOPR_NOOFROOMS	NUMBER(3)	NOT NULL
	,YOPR_PAX	NUMBER(3)	NOT NULL
	,YOPR_NOTES	VARCHAR2(1000)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YOPR ADD (
	CONSTRAINT YOPR_PK
	PRIMARY KEY
	            (
	             YOPR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YOPR_XOPP_ID ON YOPR
	(
	  YOPR_XOPP_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YOPR_YSRC_ID ON YOPR
	(
	  YOPR_YSRC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YRAA  */
CREATE TABLE YRAA (
	 YRAA_ID	NUMBER(30)	NOT NULL
	,YRAA_YDET_ID	NUMBER(30)	NOT NULL
	,YRAA_AGE	NUMBER(3)	NOT NULL
	,YRAA_NUMBER	NUMBER(3)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YRAA ADD (
	CONSTRAINT YRAA_PK
	PRIMARY KEY
	            (
	             YRAA_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YRAA_YDET_ID ON YRAA
	(
	  YRAA_YDET_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YRDB  */
CREATE TABLE YRDB (
	 YRDB_ID	NUMBER(30)	NOT NULL
	,YRDB_DISPLORDER	NUMBER(5)	NOT NULL
	,YRDB_TYPE	NUMBER(2)	NOT NULL
	,YRDB_VALUE	NUMBER(5)	NOT NULL
	,YRDB_YRDT_ID	NUMBER(30)	NOT NULL
	,YRDB_MINDAYS	NUMBER(5)	    NULL
	,YRDB_MAXDAYS	NUMBER(5)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YRDB ADD (
	CONSTRAINT YRDB_PK
	PRIMARY KEY
	            (
	             YRDB_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YRDB_DISPLORDER ON YRDB
	(
	  YRDB_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YRDB_YRDT_ID ON YRDB
	(
	  YRDB_YRDT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YRDL  */
CREATE TABLE YRDL (
	 YRDL_DATE	DATE	NOT NULL
	,YRDL_CREATIONDATE	DATE	NOT NULL
	,YRDL_REASON	VARCHAR2(2000)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YRDL ADD (
	CONSTRAINT YRDL_PK
	PRIMARY KEY
	            (
	             YRDL_DATE
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  YRDU  */
CREATE TABLE YRDU (
	 YRDU_ID	NUMBER(30)	NOT NULL
	,YRDU_FIDELIODATE	DATE	NOT NULL
	,YRDU_PCDATE	DATE	NOT NULL
	,YRDU_YRDC_FOR_DATE	DATE	NOT NULL
	,YRDU_YRDC_OLD_DATE	DATE	    NULL
	,YRDU_YRDT_ID	NUMBER(30)	NOT NULL
	,YRDU_OLD_YRDT_ID	NUMBER(30)	    NULL
	,YRDU_TYPE	NUMBER(1) DEFAULT 0 	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YRDU ADD (
	CONSTRAINT YRDU_PK
	PRIMARY KEY
	            (
	             YRDU_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YRDU_OLD_YRDT_ID ON YRDU
	(
	  YRDU_OLD_YRDT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YRDU_YRDT_ID ON YRDU
	(
	  YRDU_YRDT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YRLH  */
CREATE TABLE YRLH (
	 YRLH_ID	NUMBER(30)	NOT NULL
	,YRLH_YRCH_ID	NUMBER(30)	    NULL
	,YRLH_LINK_YRCH_ID	NUMBER(30)	    NULL
	,YRLH_LINKTYPE	NUMBER(1)	    NULL
	,YRLH_VALUE	NUMBER(30,4)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YRLH ADD (
	CONSTRAINT YRLH_PK
	PRIMARY KEY
	            (
	             YRLH_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YRLH_LINK_YRCH_ID ON YRLH
	(
	  YRLH_LINK_YRCH_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YRLH_YRCH_ID ON YRLH
	(
	  YRLH_YRCH_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YRSL  */
CREATE TABLE YRSL (
	 YRSL_ID	NUMBER(30)	NOT NULL
	,YRSL_YSRC_ID	NUMBER(30)	NOT NULL
	,YRSL_YCAT_ID	NUMBER(30)	NOT NULL
	,YRSL_DISPLORDER	NUMBER(3)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YRSL ADD (
	CONSTRAINT YRSL_PK
	PRIMARY KEY
	            (
	             YRSL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YRSL_DISPLORDER ON YRSL
	(
	  YRSL_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YRSL_YCAT_ID ON YRSL
	(
	  YRSL_YCAT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YRSL_YSRC_ID ON YRSL
	(
	  YRSL_YSRC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YSFL  */
CREATE TABLE YSFL (
	 YSFL_ID	NUMBER(30)	NOT NULL
	,YSFL_YSTY_ID	NUMBER(30)	NOT NULL
	,YSFL_YSFT_ID	NUMBER(30)	NOT NULL
	,YSFL_DISPLORDER	NUMBER(3)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YSFL ADD (
	CONSTRAINT YSFL_PK
	PRIMARY KEY
	            (
	             YSFL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YSFL_DISPLORDER ON YSFL
	(
	  YSFL_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YSFL_YSFT_ID ON YSFL
	(
	  YSFL_YSFT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YSFL_YSTY_ID ON YSFL
	(
	  YSFL_YSTY_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YSFT  */
CREATE TABLE YSFT (
	 YSFT_ID	NUMBER(30)	NOT NULL
	,YSFT_SHORTDESC	VARCHAR2(5)	NOT NULL
	,YSFT_LONGDESC	VARCHAR2(30)	NOT NULL
	,YSFT_DISPLORDER	NUMBER(3)	NOT NULL
	,YSFT_INACTIVE	NUMBER(1)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YSFT ADD (
	CONSTRAINT YSFT_PK
	PRIMARY KEY
	            (
	             YSFT_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YSFT_DISPLORDER ON YSFT
	(
	  YSFT_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YSRC  */
CREATE TABLE YSRC (
	 YSRC_ID	NUMBER(30)	NOT NULL
	,YSRC_SHORTDESC	VARCHAR2(5)	NOT NULL
	,YSRC_LONGDESC	VARCHAR2(30)	NOT NULL
	,YSRC_DISPLORDER	NUMBER(3)	NOT NULL
	,YSRC_INACTIVE	NUMBER(1)	    NULL
	,YSRC_SHORTWEBINFO	VARCHAR2(1000)	    NULL
	,YSRC_LONGWEBINFO	VARCHAR2(2000)	    NULL
	,YSRC_MD_LONGWEBINFO	VARCHAR2(2000)	    NULL
	,YSRC_MD_SHORTWEBINFO	VARCHAR2(1000)	    NULL
	,YSRC_EXTENDEDWEBINFO	VARCHAR2(2000)	    NULL
	,YSRC_MD_EXTENDEDWEBINFO	VARCHAR2(2000)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YSRC ADD (
	CONSTRAINT YSRC_PK
	PRIMARY KEY
	            (
	             YSRC_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YSRC_DISPLORDER ON YSRC
	(
	  YSRC_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YTRR  */
CREATE TABLE YTRR (
	 YTRR_ID	NUMBER(30)	NOT NULL
	,YTRR_CALCDATE	DATE	    NULL
	,YTRR_CALCFORDATE	DATE	    NULL
	,YTRR_YRES_ID	NUMBER(30)	    NULL
	,YTRR_YDET_ID	NUMBER(30)	    NULL
	,YTRR_YBLH_ID	NUMBER(30)	    NULL
	,YTRR_YGRP_ID	NUMBER(30)	    NULL
	,YTRR_XCMA_ID	NUMBER(30)	    NULL
	,YTRR_YCAT_ID	NUMBER(30)	    NULL
	,YTRR_GROSS_TOTAL	NUMBER(30,4)	    NULL
	,YTRR_NET_TOTAL	NUMBER(30,4)	    NULL
	,YTRR_GROSS_ROOM	NUMBER(30,4)	    NULL
	,YTRR_NET_ROOM	NUMBER(30,4)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YTRR ADD (
	CONSTRAINT YTRR_PK
	PRIMARY KEY
	            (
	             YTRR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YTRRDATES ON YTRR
	(
	  YTRR_CALCDATE
	 ,YTRR_CALCFORDATE
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YTRR_CALCDATE ON YTRR
	(
	  YTRR_CALCDATE
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YTRR_CALCFORDATE ON YTRR
	(
	  YTRR_CALCFORDATE
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YTRR_XCMA_ID ON YTRR
	(
	  YTRR_XCMA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YTRR_YBLH_ID ON YTRR
	(
	  YTRR_YBLH_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YTRR_YCAT_ID ON YTRR
	(
	  YTRR_YCAT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YTRR_YDET_ID ON YTRR
	(
	  YTRR_YDET_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YTRR_YGRP_ID ON YTRR
	(
	  YTRR_YGRP_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YTRR_YRES_ID ON YTRR
	(
	  YTRR_YRES_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZCNR  */
CREATE TABLE ZCNR (
	 ZCNR_ID	NUMBER(30)	NOT NULL
	,ZCNR_RANGE_START	VARCHAR2(40)	NOT NULL
	,ZCNR_RANGE_END	VARCHAR2(40)	NOT NULL
	,ZCNR_ZCCS_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZCNR ADD (
	CONSTRAINT ZCNR_PK
	PRIMARY KEY
	            (
	             ZCNR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZCNR_ZCCS_ID ON ZCNR
	(
	  ZCNR_ZCCS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YRFR  */
CREATE TABLE YRFR (
    YRFR_ID NUMBER(30) NOT NULL
   ,YRFR_DATE DATE NOT NULL
   ,YRFR_XCED_ID NUMBER(30) NOT NULL
   ,CONSTRAINT YRFR_PK PRIMARY KEY (YRFR_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8MAIN;

/*  XOPP  */
CREATE TABLE XOPP (
   XOPP_ID NUMBER(30) NOT NULL
  ,XOPP_OWNER_XCED_ID NUMBER(30)
  ,XOPP_ACCOUNT_XCMS_ID NUMBER(30)
  ,XOPP_NAME VARCHAR2(120) 
  ,XOPP_DESCRIPTION VARCHAR2(1000)
  ,XOPP_XOPS_ID NUMBER(30)
  ,XOPP_AMOUNT NUMBER(30, 4)
  ,XOPP_PROBABILITY NUMBER(3)
  ,XOPP_EXPECTEDREVENUE NUMBER(30, 4)
  ,XOPP_TOTALOPPORTUNITYQUANTITY NUMBER(30, 4)  
  ,XOPP_CLOSEDATE DATE  
  ,XOPP_XOPT_ID NUMBER(30)
  ,XOPP_XOPL_ID NUMBER(30)
  ,XOPP_ISCLOSED NUMBER(1)  
  ,XOPP_ISWON NUMBER(1)  
  ,XOPP_XOPC_ID NUMBER(30)  
  ,XOPP_HASOPPORTUNITYLINEITEM NUMBER(1)  
  ,XOPP_FISCALQUARTER NUMBER(1)  
  ,XOPP_FISCALYEAR NUMBER(4)  
  ,XOPP_XOPD_ID NUMBER(30)  
  ,XOPP_TRACKINGNUMBER VARCHAR(30)  
  ,XOPP_ORDERNUMBER VARCHAR(30) 
  ,XOPP_CURRENTGENERATOR VARCHAR(100) 
  ,XOPP_MAINCOMPETITOR VARCHAR(100) 
  ,XOPP_THIRD_PARTY_ID VARCHAR(30) 
  ,XOPP_SF_LASTMODIFIED_DATE DATE
  ,XOPP_INACTIVE_REASON VARCHAR2(100)
  ,XOPP_NEXTSTEP VARCHAR2(255)
  ,XOPP_PRIVATE NUMBER(1)
  ,XOPP_INACTIVE NUMBER(1)
  ,CONSTRAINT XOPP_PK PRIMARY KEY (XOPP_ID) USING INDEX TABLESPACE V8INDEX
) TABLESPACE V8MAIN;

/*  XCNL  */
CREATE TABLE XCNL (
    XCNL_ID NUMBER(30) NOT NULL
   ,XCNL_XCNC_ID NUMBER(30) NOT NULL
   ,XCNL_WHDE_ID NUMBER(30) NOT NULL
   ,CONSTRAINT XCNL_PK PRIMARY KEY (XCNL_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

/*  WDEC  */
CREATE TABLE WDEC (
  WDEC_ID           NUMBER(30)                  NOT NULL,
  WDEC_REPORT_ROLE  NUMBER(2)                   NOT NULL,
  WDEC_WRPT_ID      NUMBER(30)                  NOT NULL
  ,CONSTRAINT WDEC_PK PRIMARY KEY (WDEC_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

/*  XSST  */   
CREATE TABLE XSST
(
  XSST_ID          NUMBER(30)                   NOT NULL,
  XSST_SHORTDESC   VARCHAR2(3 BYTE)             NOT NULL,
  XSST_LONGDESC    VARCHAR2(30 BYTE)            NOT NULL,
  XSST_DISPLORDER  NUMBER(3)                        NULL,
  XSST_GVMNT_ID    NUMBER(30)                       NULL
  ,CONSTRAINT XSST_PK PRIMARY KEY (XSST_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;
   
/*  FPLI  */   
CREATE TABLE FPLI
(
  FPLI_ID          NUMBER(30)                   NOT NULL,
  FPLI_FPLD_ID     NUMBER(30)                   NOT NULL,
  FPLI_YOUT_ID     NUMBER(30),
  FPLI_YCMI_ID     NUMBER(30),
  FPLI_PRICE       NUMBER(30,4),
  FPLI_EXCLUDE     NUMBER(1),
  FPLI_FLEX        NUMBER(1)                    NOT NULL,
  constraint fpli_pk primary key (fpli_id) using index tablespace v8index
)
TABLESPACE V8CONF;

/*  WRPX  */   
CREATE TABLE WRPX (
    WRPX_ID NUMBER(30) NOT NULL
   ,WRPX_SEARCHTYPE NUMBER(1) NOT NULL
   ,WRPX_INTERNALCATEGORY NUMBER(1) 
   ,WRPX_RESSTATUS NUMBER(1) 
   ,CONSTRAINT WRPX_PK PRIMARY KEY (WRPX_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8MAIN;

/*  WFMS  */   
CREATE TABLE WFMS (
    WFMS_ID NUMBER(30) NOT NULL
   ,WFMS_WFMC_ID NUMBER(30) NOT NULL
   ,WFMS_SCRIPT LONG
   ,CONSTRAINT WFMS_PK PRIMARY KEY (WFMS_ID) USING INDEX TABLESPACE V8INDEX
) TABLESPACE V8MAIN;
   
/*  WAMT  */   
CREATE TABLE WAMT
(
  WAMT_ID NUMBER(30) NOT NULL
  ,WAMT_WATY_ID NUMBER(30)
  ,WAMT_PLACE_TYPE NUMBER(1)
  ,WAMT_XCED_ID NUMBER(30)
  ,WAMT_NOTES VARCHAR2(2000)
  ,WAMT_INACTIVE NUMBER(1)
  ,WAMT_CONDITION VARCHAR2(2000)
  ,CONSTRAINT WAMT_PK PRIMARY KEY (WAMT_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

/*  YOPL  */     
CREATE TABLE YOPL (
YOPL_ID NUMBER(30) NOT NULL
,YOPL_YOPF_ID NUMBER(30) NOT NULL
,YOPL_YEVM_ID NUMBER(30) NOT NULL
,CONSTRAINT YOPL_PK PRIMARY KEY (YOPL_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8MAIN;

/*  XCHS  */     
CREATE TABLE XCHS (
 XCHS_ID NUMBER(30) NOT NULL
,XCHS_XCMS_ID NUMBER(30) NOT NULL
,XCHS_WPHS_ID NUMBER(30) NOT NULL
,XCHS_INSERT_DATE DATE
,XCHS_LASTUPDATE_DATE DATE
,CONSTRAINT XCHS_PK PRIMARY KEY (XCHS_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8MAIN;

   
/************************************************************************************************************************
*
*  The following statements will upgrade the COMMON tables
*
************************************************************************************************************************/


ALTER TABLE CART MODIFY ( CART_WEBNAME VARCHAR2(300) );

ALTER TABLE COUP ADD ( COUP_ORDERING_XCMS_ID NUMBER(30) NULL  );

ALTER TABLE IDCO MODIFY ( IDCO_CALL_TYPE VARCHAR2(128) );

ALTER TABLE MCNV ADD ( MCNV_SUBTYPE NUMBER(2) NULL  );

ALTER TABLE QNRF ADD ( QNRF_INPUTSOURCE NUMBER(1) NULL  );

ALTER TABLE RRES ADD ( RRES_YEVM_ID NUMBER(30) NULL  );

ALTER TABLE RRES ADD ( RRES_CRSSYSTEM VARCHAR2(30) NULL  );

ALTER TABLE RRST ADD ( RRST_WEBINFO VARCHAR2(2000) NULL  );

ALTER TABLE RRST ADD ( RRST_LONGWEBINFO VARCHAR2(2000) NULL  );

ALTER TABLE RRST ADD ( RRST_MD_SHORTWEBINFO VARCHAR2(1000) NULL  );

ALTER TABLE RRST ADD ( RRST_MD_LONGWEBINFO VARCHAR2(2000) NULL  );

ALTER TABLE RRST ADD ( RRST_THRESHOLD VARCHAR2(2000) NULL  );

ALTER TABLE RRST ADD ( RRST_WEBENABLED NUMBER(1) NULL  );

ALTER TABLE SBUD ADD ( SBUD_WPHS_ID NUMBER(30) NULL  );

ALTER TABLE SBUD ADD ( SBUD_PARTNER_ID NUMBER(30) NULL  );

ALTER TABLE SBUD ADD ( SBUD_IMPORTED NUMBER(1) NULL  );

ALTER TABLE SMAD ADD ( SMAD_CHILDS_G1_D NUMBER(6) NULL  );

ALTER TABLE SMAD ADD ( SMAD_CHILDS_G1_M NUMBER(6) NULL  );

ALTER TABLE SMAD ADD ( SMAD_CHILDS_G1_Y NUMBER(6) NULL  );

ALTER TABLE SMAD ADD ( SMAD_CHILDS_G2_D NUMBER(7) NULL  );

ALTER TABLE SMAD ADD ( SMAD_CHILDS_G2_M NUMBER(7) NULL  );

ALTER TABLE SMAD ADD ( SMAD_CHILDS_G2_Y NUMBER(7) NULL  );

ALTER TABLE SMAD ADD ( SMAD_CHILDS_G3_D NUMBER(7) NULL  );

ALTER TABLE SMAD ADD ( SMAD_CHILDS_G3_M NUMBER(7) NULL  );

ALTER TABLE SMAD ADD ( SMAD_CHILDS_G3_Y NUMBER(7) NULL  );

ALTER TABLE SMAD ADD ( SMAD_DOMESTICCHILDS_G1_D NUMBER(6) NULL  );

ALTER TABLE SMAD ADD ( SMAD_DOMESTICCHILDS_G1_M NUMBER(6) NULL  );

ALTER TABLE SMAD ADD ( SMAD_DOMESTICCHILDS_G1_Y NUMBER(6) NULL  );

ALTER TABLE SMAD ADD ( SMAD_DOMESTICCHILDS_G2_D NUMBER(7) NULL  );

ALTER TABLE SMAD ADD ( SMAD_DOMESTICCHILDS_G2_M NUMBER(7) NULL  );

ALTER TABLE SMAD ADD ( SMAD_DOMESTICCHILDS_G2_Y NUMBER(7) NULL  );

ALTER TABLE SMAD ADD ( SMAD_DOMESTICCHILDS_G3_D NUMBER(7) NULL  );

ALTER TABLE SMAD ADD ( SMAD_DOMESTICCHILDS_G3_M NUMBER(7) NULL  );

ALTER TABLE SMAD ADD ( SMAD_DOMESTICCHILDS_G3_Y NUMBER(7) NULL  );

ALTER TABLE SMAN ADD ( SMAN_DAYUSEONDEPARTURE_D NUMBER(5) NULL  );

ALTER TABLE SMAN ADD ( SMAN_DAYUSEONDEPARTURE_M NUMBER(5) NULL  );

ALTER TABLE SMAN ADD ( SMAN_DAYUSEONDEPARTURE_Y NUMBER(7) NULL  );

ALTER TABLE SMAN ADD ( SMAN_DAYUSEONDEP_ADULTS_D NUMBER(5) NULL  );

ALTER TABLE SMAN ADD ( SMAN_DAYUSEONDEP_ADULTS_M NUMBER(5) NULL  );

ALTER TABLE SMAN ADD ( SMAN_DAYUSEONDEP_ADULTS_Y NUMBER(7) NULL  );

ALTER TABLE TACD ADD ( TACD_FR_COMABLEAMOUNT NUMBER(30,4) NULL  );

ALTER TABLE TACD ADD ( TACD_FR_COMM_AMOUNT NUMBER(30,4) NULL  );

ALTER TABLE TACD ADD ( TACD_FR_DT NUMBER(30,4) NULL  );

ALTER TABLE WANT ADD ( WANT_NOTES_VC VARCHAR2(2000) NULL  );

ALTER TABLE WERR ADD ( WERR_COMMENTTIMESTAMP DATE NULL  );

ALTER TABLE WERR ADD ( WERR_COMMENTUSER VARCHAR2(60) NULL  );

ALTER TABLE WERR ADD ( WERR_STATUSTEXT VARCHAR2(60) NULL  );

ALTER TABLE WFLS MODIFY ( WFLS_NAME VARCHAR2(50) );

ALTER TABLE WILG ADD ( WILG_ERRORDESC_VC VARCHAR2(2000) NULL  );

ALTER TABLE WLAN ADD ( WLAN_WEBCULTURE VARCHAR2(10) NULL  );

ALTER TABLE WLOG ADD ( WLOG_TERMINAL VARCHAR2(60) NULL  );

ALTER TABLE WMSO ADD ( WMSO_BODY_WFAQ_ID NUMBER(30) NULL  );

ALTER TABLE WMSO ADD ( WMSO_ATTACHMENT_WFAQ_ID NUMBER(30) NULL  );

ALTER TABLE WMSO ADD ( WMSO_SUBJECT VARCHAR2(60) NULL  );

ALTER TABLE WMSO ADD ( WMSO_ATTACHMENT VARCHAR2(200) NULL  );

ALTER TABLE WNAE ADD ( WNAE_DEFTYPE NUMBER(1) NULL  );

ALTER TABLE WNAE ADD ( WNAE_WRPT_ID NUMBER(30) NULL  );

ALTER TABLE WNAE ADD ( WNAE_EXPORTTYPE NUMBER(1) NULL  );

ALTER TABLE WPHS ADD ( WPHS_TASKANDACTIVITY NUMBER(1) NULL  );

ALTER TABLE WPHS ADD ( WPHS_VPDID NUMBER(30) NULL  );

ALTER TABLE WPHS ADD ( WPHS_CRS_ROLE NUMBER(1) NULL  );

ALTER TABLE WQNR ADD ( WQNR_WEBINTRODUCTIONTEXT VARCHAR2(2000) NULL  );

ALTER TABLE WSPS ADD ( WSPS_VPDID NUMBER(30) NULL  );

ALTER TABLE WTBC MODIFY ( WTBC_DISPLORDER NUMBER(3) NULL  );

ALTER TABLE XCAC ADD ( XCAC_COUNTFOROCCUPANCY NUMBER(1) NULL  );

ALTER TABLE XCED ADD ( XCED_IFCONLY NUMBER(1) NULL  );

ALTER TABLE XCED ADD ( XCED_TRANSPORTATION NUMBER(1) NULL  );

ALTER TABLE XCED ADD ( XCED_SALESFORCE_ID VARCHAR2(30) NULL  );

ALTER TABLE XCED ADD ( XCED_ADSLOGINNAME VARCHAR2(30) NULL  );

ALTER TABLE XCOM ADD ( XCOM_MAILID VARCHAR2(100) NULL  );

ALTER TABLE XCTH ADD ( XCTH_MASTER_XCTH_ID NUMBER(30) NULL  );

ALTER TABLE XCTH ADD ( XCTH_WPHS_ID NUMBER(30) NULL  );

ALTER TABLE XJLG ADD ( XJLG_YRES_ID NUMBER(30) NULL  );

ALTER TABLE XJLG ADD ( XJLG_YGRP_ID NUMBER(30) NULL  );

ALTER TABLE XMLD ADD ( XMLD_AUTOSUBFOLDERS NUMBER(1) NULL  );

ALTER TABLE XMLS MODIFY ( XMLS_MAILID VARCHAR2(2000) );

ALTER TABLE XMLS MODIFY ( XMLS_STOREID VARCHAR2(2000) );

ALTER TABLE XMTY ADD ( XMTY_WEBNAME VARCHAR2(60) NULL  );

ALTER TABLE XMTY ADD ( XMTY_WEBSHORTDESC VARCHAR2(300) NULL  );

ALTER TABLE XMTY ADD ( XMTY_WIMG_ID NUMBER(30) NULL  );

ALTER TABLE YEMN ADD ( YEMN_POSTGUARANTEED NUMBER(1) NULL  );

ALTER TABLE YFRD ADD ( YFRD_INACTIVE NUMBER(1) DEFAULT 0 NULL  );

ALTER TABLE YFSC ADD ( YFSC_INACTIVE NUMBER(1) DEFAULT 0 NULL  );

ALTER TABLE YFVT ADD ( YFVT_GUESTSERVICE_STATUS NUMBER(1) NULL  );

ALTER TABLE YMES ADD ( YMES_WACT_ID NUMBER(30) NULL  );

ALTER TABLE YPIL ADD ( YPIL_CALCTYPE NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE YRCH ADD ( YRCH_SUPRESSRATE NUMBER(1) NULL  );

ALTER TABLE YRCO ADD ( YRCO_YBLH_ID NUMBER(30) NULL  );

ALTER TABLE YRCO ADD ( YRCO_DOCNAME VARCHAR2(60) NULL  );

ALTER TABLE YRDC ADD ( YRDC_AUTOMATIC NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE YRES ADD ( YRES_DENYKIOSKCHECKIN NUMBER(1) NULL  );

ALTER TABLE YRMS ADD ( YRMS_GUESTSERVICE_STATUS NUMBER(1) NULL  );

ALTER TABLE YSSC ADD ( YSSC_INACTIVE NUMBER(1) DEFAULT 0 NULL  );

ALTER TABLE YXLS MODIFY ( YXLS_COLUMNS VARCHAR2(800) );

ALTER TABLE ZCCS ADD ( ZCCS_PREFIX VARCHAR2(50) NULL  );

ALTER TABLE ZCCS ADD ( ZCCS_CARD_LENGTH VARCHAR2(50) NULL  );

ALTER TABLE ZCCS ADD ( ZCCS_VALIDATION_RULE NUMBER(1) NULL  );

ALTER TABLE ZCCS ADD ( ZCCS_USER_DEFINED NUMBER(1) NULL  );

ALTER TABLE ZCCS ADD ( ZCCS_DISPLORDER NUMBER(3) NULL  );

ALTER TABLE ZCCS ADD ( ZCCS_INACTIVE NUMBER(1) NULL  );

ALTER TABLE ZPOS ADD ( ZPOS_DEPOSIT_ZINV_ID NUMBER(30) NULL  );

ALTER TABLE WNAS ADD ( WNAS_INACTIVE NUMBER(1) NULL  );

ALTER TABLE YFMI ADD ( YFMI_NOOFPAX NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE XJET ADD ( XJET_DAYSRETRY NUMBER(3) NULL  );   

ALTER TABLE XJET ADD ( XJET_NOJETWEBGRPDEFAULT NUMBER(1) NULL  );

ALTER TABLE XJET ADD ( XJET_ALLOWTENTATIVE NUMBER(1) NULL  );

ALTER TABLE XJET ADD ( XJET_NADAYSINADVANCE NUMBER(3) NULL  );

ALTER TABLE XJET ADD ( XJET_BETRIEBNRALPHA VARCHAR(10) NULL  );

ALTER TABLE WZIP ADD ( WZIP_XSST_ID NUMBER(30) NULL  );

ALTER TABLE YRES ADD ( YRES_YRFR_ID NUMBER (30) NULL  );

ALTER TABLE WFMC ADD ( WFMC_SYSTEMVERSION NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE W8HP ADD ( W8HP_CCM_MS_XCMA_ID NUMBER(30) NULL  );
                     
ALTER TABLE W8HP ADD ( W8HP_CCM_SC_YRAS_ID NUMBER(30) NULL  );

ALTER TABLE W8HP ADD ( W8HP_CCM_CC_YRAS_ID NUMBER(30) NULL  );

ALTER TABLE W8HP ADD ( W8HP_CCM_NC_XCNC_ID NUMBER(30) NULL  );

ALTER TABLE W8HP ADD ( W8HP_CCM_CM_XCMS_ID NUMBER(30) NULL  );

ALTER TABLE W8HP ADD ( W8HP_XML_MWRD DATE NULL  );

ALTER TABLE W8HP ADD ( W8HP_XML_S8HPAVLLIMIT_YALG_ID NUMBER(30) NULL  );


/************************************************************************************************************************
*
*  The following statements will upgrade the data and COMMON tables
*
************************************************************************************************************************/


ALTER TABLE XCMG ADD ( XCMG_GLOBALID_TMP VARCHAR2(50) NULL  );

UPDATE XCMG SET XCMG_GLOBALID_TMP = TO_CHAR(XCMG_GLOBALID);

ALTER TABLE XCMG DROP COLUMN XCMG_GLOBALID;

ALTER TABLE XCMG RENAME COLUMN XCMG_GLOBALID_TMP TO XCMG_GLOBALID;

ALTER TABLE XCTH ADD (XCTH_EXPIRYDATE DATE, XCTH_SIGNUPDATE DATE, XCTH_STARTDATE DATE, XCTH_CONTRACTNAME VARCHAR2(30 CHAR));

UPDATE XCTH SET 
       XCTH_EXPIRYDATE   = (SELECT XMNR_EXPIRYDATE FROM XMNR, XCTL WHERE XCTL_XCTH_ID=XCTH_ID AND XMNR_ID = XCTL_XMNR_ID AND ROWNUM = 1),
       XCTH_SIGNUPDATE   = (SELECT XMNR_SIGNUPDATE FROM XMNR, XCTL WHERE XCTL_XCTH_ID=XCTH_ID AND XMNR_ID = XCTL_XMNR_ID AND ROWNUM = 1),
       XCTH_STARTDATE    = (SELECT XMNR_STARTDATE  FROM XMNR, XCTL WHERE XCTL_XCTH_ID=XCTH_ID AND XMNR_ID = XCTL_XMNR_ID AND ROWNUM = 1),
       XCTH_CONTRACTNAME = (SELECT XMNR_VALUE      FROM XMNR, XCTL WHERE XCTL_XCTH_ID=XCTH_ID AND XMNR_ID = XCTL_XMNR_ID AND ROWNUM = 1);

ALTER TABLE XCTL ADD (XCTL_XCMS_ID NUMBER(30) NULL  );

UPDATE XCTL SET XCTL_XCMS_ID = (SELECT XMNR_XCMS_ID FROM XMNR WHERE XMNR_ID = XCTL_XMNR_ID);

COMMIT;


/************************************************************************************************************************
*
*  The following statements will upgrade the indexes for the COMMON tables
*
************************************************************************************************************************/


/*  COUP  */

CREATE INDEX COUP_ORDERING_XCMS_ID ON COUP
	(
	  COUP_ORDERING_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  RRES  */

CREATE INDEX RRES_YEVM_ID ON RRES
	(
	  RRES_YEVM_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  SBUD  */

CREATE INDEX SBUD_PARTNER_ID ON SBUD
	(
	  SBUD_PARTNER_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SBUD_WPHS_ID ON SBUD
	(
	  SBUD_WPHS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  WMSO  */

CREATE INDEX WMSO_ATTACHMENT_WFAQ_ID ON WMSO
	(
	  WMSO_ATTACHMENT_WFAQ_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX WMSO_BODY_WFAQ_ID ON WMSO
	(
	  WMSO_BODY_WFAQ_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  WNAE  */

CREATE INDEX WNAE_WRPT_ID ON WNAE
	(
	  WNAE_WRPT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XCED  */

CREATE INDEX XCED_SALESFORCE_ID ON XCED
	(
	  XCED_SALESFORCE_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XCMG  */
DROP INDEX XCMG_XCMS_ID;
DROP INDEX XCMG_XCMS_GLOBALID;
CREATE INDEX XCMG_XCMS_ID ON XCMG
	(
	  XCMG_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XCTH  */

CREATE INDEX XCTH_MASTER_XCTH_ID ON XCTH
	(
	  XCTH_MASTER_XCTH_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XCTH_WPHS_ID ON XCTH
	(
	  XCTH_WPHS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XJLG  */

CREATE INDEX XJLG_YGRP_ID ON XJLG
	(
	  XJLG_YGRP_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XJLG_YRES_ID ON XJLG
	(
	  XJLG_YRES_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XMTY  */

CREATE INDEX XMTY_WIMG_ID ON XMTY
	(
	  XMTY_WIMG_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YMES  */

CREATE INDEX YMES_WACT_ID ON YMES
	(
	  YMES_WACT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YRCO  */

CREATE INDEX YRCO_YBLH_ID ON YRCO
	(
	  YRCO_YBLH_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  ZCCS  */

CREATE INDEX ZCCS_DISPLORDER ON ZCCS
	(
	  ZCCS_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;


/************************************************************************************************************************
*
*  The following statements will upgrade the data
*
************************************************************************************************************************/


INSERT INTO YMSP SELECT SEQ_YMSP.NEXTVAL,YPAC_MASTER_YPAC_ID,YPAC_ID FROM YPAC WHERE YPAC_MASTER_YPAC_ID IS NOT NULL;

UPDATE FPLI SET FPLI_YOUT_ID = NULL WHERE FPLI_YOUT_ID = 0;

UPDATE YCMR SET YCMR_YOUT_ID = NULL WHERE YCMR_DEFAULT > 0;

DELETE FROM WFTR WHERE WFTR_FORM LIKE 'fAutoRoomAssign' AND (WFTR_COMPONENT = 'Panel2' OR WFTR_COMPONENT = 'Panel4');

UPDATE W8HP SET W8HP_CCM_MS_XCMA_ID=(SELECT TO_NUMBER(WUSS_VALUE) FROM WUSS WHERE WUSS_NAME='WebBookingConferenceMarketCode');

UPDATE W8HP SET W8HP_CCM_SC_YRAS_ID=(SELECT TO_NUMBER(WUSS_VALUE) FROM WUSS WHERE WUSS_NAME='WebBookingConferenceSourceCode');

UPDATE W8HP SET W8HP_CCM_CC_YRAS_ID=(SELECT TO_NUMBER(WUSS_VALUE) FROM WUSS WHERE WUSS_NAME='WBConferenceChannelCode');

UPDATE W8HP SET W8HP_CCM_NC_XCNC_ID=(SELECT TO_NUMBER(WUSS_VALUE) FROM WUSS WHERE WUSS_NAME='WebBookingConferenceNotesCategory');

UPDATE W8HP SET W8HP_CCM_CM_XCMS_ID=(SELECT TO_NUMBER(WUSS_VALUE) FROM WUSS WHERE WUSS_NAME='WebBookingConferenceManager');

UPDATE W8HP SET W8HP_XML_S8HPAVLLIMIT_YALG_ID=(SELECT TO_NUMBER(WUSS_VALUE) FROM WUSS WHERE WUSS_NAME='XMLWebAvlLimit');

COMMIT;


--- End of DBDiff for Oracle --- Elapsed Time: 00:05:15 ---
