/**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_ANALYSISCHART') 
 CREATE TABLE T_BCM_ANALYSISCHART (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FCODE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FTYPE CHAR(1) DEFAULT '1' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FTHEMETYPEID BIGINT DEFAULT 0 NOT NULL,
FIMAGESRC NVARCHAR(500) DEFAULT ' ' NOT NULL,
FIMAGENAME NVARCHAR(500) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ANALYSISCHARTACCOUN') 
 CREATE TABLE T_BCM_ANALYSISCHARTACCOUN (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FACCOUNTID BIGINT DEFAULT 0 NOT NULL,
FRANGE CHAR(2) DEFAULT '10' NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ANALYSISTHEMETYPE') 
 CREATE TABLE T_BCM_ANALYSISTHEMETYPE (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FPARENTID BIGINT DEFAULT 0 NOT NULL,
FLEVEL INT DEFAULT 0 NOT NULL,
FISLEAF CHAR(1) DEFAULT ' ' NOT NULL
);



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_table.sql **/
