/**Begin D:\DBA\1.4\PDM_UPGRADE\PDM1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ANALYSISHELPER') 
 CREATE TABLE T_BCM_ANALYSISHELPER (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(100) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FISPRESET CHAR(1) DEFAULT '0' NOT NULL,
FANALYSISTYPE VARCHAR(1) DEFAULT '1' NOT NULL,
FDESCRIPRION NVARCHAR(150) DEFAULT ' ' NOT NULL,
FISSHOWDIMLIST CHAR(1) DEFAULT '0' NOT NULL,
FISCOMWITHDIMLIST CHAR(1) DEFAULT '0' NOT NULL,
FANAYSISDIM VARCHAR(50) DEFAULT ' ' NOT NULL,
FSHOWPREDIMMEMBER INT DEFAULT 0 NOT NULL,
FSERIESLIMIT INT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FCREATOR BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FTEMPLATECATALOGID BIGINT DEFAULT 0 NOT NULL,
FSTATUS VARCHAR(1) DEFAULT '0' NOT NULL,
FMEMBERINFO VARCHAR(500) DEFAULT ' ' NOT NULL,
FALERTNUM VARCHAR(500) DEFAULT ' ' NOT NULL,
FPERMCLASSID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ANALYSISHELPER_L') 
 CREATE TABLE T_BCM_ANALYSISHELPER_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPRION NVARCHAR(150) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ANAYSISDIMRANGE') 
 CREATE TABLE T_BCM_ANAYSISDIMRANGE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDIMRANGEVALUE VARCHAR(50) DEFAULT ' ' NOT NULL,
FDIMRANGE VARCHAR(10) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ANAYSISCATALOG') 
 CREATE TABLE T_BCM_ANAYSISCATALOG (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FLEVEL INT DEFAULT 0 NOT NULL,
FISLEAF CHAR(1) DEFAULT '0' NOT NULL,
FPARENTID BIGINT DEFAULT 0 NOT NULL,
FPERMCLASSID BIGINT DEFAULT 0 NOT NULL,
FDESCRIPTION NVARCHAR(100) DEFAULT ' ' NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FSEQUENCE INT DEFAULT 0 NOT NULL,
FLONGNUMBER VARCHAR(255) DEFAULT ' ' NOT NULL,
FFULLNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCATALOGTYPE VARCHAR(50) DEFAULT ' ' NOT NULL
);


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



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