/**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_ANALYTICSSOLUTIONS' AND KSQL_COL_NAME ='FSHOWMEMBERSTYLE') 
 ALTER TABLE T_BCM_ANALYTICSSOLUTIONS ADD (FSHOWMEMBERSTYLE VARCHAR(10) DEFAULT '3' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYTICSSOLUTIONS' AND KSQL_COL_NAME ='FMONEYUNIT') 
 ALTER TABLE T_BCM_ANALYTICSSOLUTIONS ADD (FMONEYUNIT VARCHAR(10) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYTICSSOLUTIONS' AND KSQL_COL_NAME ='FHIDEROW') 
 ALTER TABLE T_BCM_ANALYTICSSOLUTIONS ADD (FHIDEROW INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ANALYTICSSOLUTIONS' AND KSQL_COL_NAME ='FHIDECOL') 
 ALTER TABLE T_BCM_ANALYTICSSOLUTIONS ADD (FHIDECOL INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ANALYSOLUTOTALROW') 
 CREATE TABLE T_BCM_ANALYSOLUTOTALROW (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FTYPE VARCHAR(10) DEFAULT '2' NOT NULL,
FROWINDEX INT DEFAULT 0 NOT NULL,
FCOLINDEX INT DEFAULT 0 NOT NULL,
FVALUE NVARCHAR(500) DEFAULT ' ' NOT NULL,
FFORMULA VARCHAR(255) DEFAULT ' ' NOT NULL
);



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