/**Begin D:\DBA\1.4\PDM_UPGRADE\PDM1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYSOLUPAGEDIM' AND KSQL_COL_NAME ='FDATATYPE') 
 ALTER TABLE T_BCM_ANALYSOLUPAGEDIM ADD (FDATATYPE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYSOLUPAGEDIM' AND KSQL_COL_NAME ='FEXTDIMID') 
 ALTER TABLE T_BCM_ANALYSOLUPAGEDIM ADD (FEXTDIMID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYSOLUCOLUMNDIM' AND KSQL_COL_NAME ='FEXTDIMS') 
 ALTER TABLE T_BCM_ANALYSOLUCOLUMNDIM ADD (FEXTDIMS VARCHAR(2000) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYSOLUCOLUMNDIM' AND KSQL_COL_NAME ='FCOLDATATYPE') 
 ALTER TABLE T_BCM_ANALYSOLUCOLUMNDIM ADD (FCOLDATATYPE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYSOLUCOLUMNDIM' AND KSQL_COL_NAME ='FEXTDIMID') 
 ALTER TABLE T_BCM_ANALYSOLUCOLUMNDIM ADD (FEXTDIMID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYSOLUROWDIM' AND KSQL_COL_NAME ='FEXTDIMS') 
 ALTER TABLE T_BCM_ANALYSOLUROWDIM ADD (FEXTDIMS VARCHAR(2000) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYSOLUROWDIM' AND KSQL_COL_NAME ='FROWDATATYPE') 
 ALTER TABLE T_BCM_ANALYSOLUROWDIM ADD (FROWDATATYPE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYSOLUROWDIM' AND KSQL_COL_NAME ='FEXTDIMID') 
 ALTER TABLE T_BCM_ANALYSOLUROWDIM ADD (FEXTDIMID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYTICSSOLUTIONS' AND KSQL_COL_NAME ='FEXTMODELID') 
 ALTER TABLE T_BCM_ANALYTICSSOLUTIONS ADD (FEXTMODELID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYTICSSOLUTIONS' AND KSQL_COL_NAME ='FSOLUTIONTYPE') 
 ALTER TABLE T_BCM_ANALYTICSSOLUTIONS ADD (FSOLUTIONTYPE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ANALYSISCONDITION') 
 CREATE TABLE T_BCM_ANALYSISCONDITION (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FCONDITION NCLOB
);



/**End D:\DBA\1.4\PDM_UPGRADE\PDM1\BCM_table.sql **/
