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

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_DATAANALYTICSSCHEM') 
 CREATE TABLE T_BCM_DATAANALYTICSSCHEM (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCOMBOFIELD CHAR(1) DEFAULT ' ' NOT NULL,
FEXTMODELID BIGINT DEFAULT 0 NOT NULL,
FPERMRANGE CHAR(1) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FEXCLUDENULLDATA CHAR(1) DEFAULT '0' NOT NULL,
FEXCLUDEDYNADATA CHAR(1) DEFAULT '0' NOT NULL,
FHIGHFILTER VARCHAR(2000) DEFAULT ' ' NOT NULL,
FANALYTICSTYPE CHAR(1) DEFAULT '1' NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_DATAANALYTICSSCHEM_L') 
 CREATE TABLE T_BCM_DATAANALYTICSSCHEM_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(510) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_DATAANALYTICSDIM') 
 CREATE TABLE T_BCM_DATAANALYTICSDIM (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDIMENSIONID BIGINT DEFAULT 0 NOT NULL,
FRANGE VARCHAR(50) DEFAULT ' ' NOT NULL,
FMEMBERID BIGINT DEFAULT 0 NOT NULL,
FDPROPERTYID BIGINT DEFAULT 0 NOT NULL
);



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