/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_CHKDISPLAYSETTING') 
 CREATE TABLE T_BCM_CHKDISPLAYSETTING (
FID BIGINT DEFAULT 0 NOT NULL,
FSELECTDIMS VARCHAR(100) DEFAULT ' ' NOT NULL,
FTYPE INT DEFAULT 1 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_CHKMEMBRANGE') 
 CREATE TABLE T_BCM_CHKMEMBRANGE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FMEMBERID BIGINT DEFAULT 0 NOT NULL,
FMEMBBOUND INT DEFAULT 10 NOT NULL,
FDIMENSIONID BIGINT DEFAULT 0 NOT NULL,
FPROPERTYID BIGINT DEFAULT 0 NOT NULL,
FMEMBPROPID BIGINT DEFAULT 0 NOT NULL,
FMEMBBOUNDTYPE CHAR(1) DEFAULT '1' NOT NULL,
FLIMITTYPE INT DEFAULT 1 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_CHKREPORT') 
 CREATE TABLE T_BCM_CHKREPORT (
FID BIGINT DEFAULT 0 NOT NULL,
FCHKRESULTTYPE CHAR(1) DEFAULT '1' NOT NULL,
FCALCRESULTEXPR VARCHAR(2000) DEFAULT ' ' NOT NULL,
FCHKFORMULAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_CHKFORMULASETTING') 
 CREATE TABLE T_BCM_CHKFORMULASETTING (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FLEFTFORMULA VARCHAR(2000) DEFAULT ' ' NOT NULL,
FRIGHTFORMULA VARCHAR(2000) DEFAULT ' ' NOT NULL,
FCOMPARETYPE CHAR(1) DEFAULT '1' NOT NULL,
FALLOWAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FCHKEFFECTTYPE CHAR(1) DEFAULT '1' NOT NULL,
FOWNERORGID BIGINT DEFAULT 0 NOT NULL,
FOWNERTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME
);



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\BCM_table.sql **/
