/**Begin D:\PDM_UPGRADE\PDM1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_MENUUPGRADE') 
 CREATE TABLE T_BCM_MENUUPGRADE (
FID BIGINT DEFAULT 0 NOT NULL,
FUSER BIGINT DEFAULT 0 NOT NULL,
FMENUEDITION BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_INVSHARERELA_RPT') 
 CREATE TABLE T_BCM_INVSHARERELA_RPT (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FSHAREHOLDERID BIGINT DEFAULT 0 NOT NULL,
FINVESTEECOMPANYID BIGINT DEFAULT 0 NOT NULL,
FINVCHANGETYPEID BIGINT DEFAULT 0 NOT NULL,
FHOLDERCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FINVCOMPANYCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FCHANGESCALE DECIMAL(33,15) DEFAULT 0 NOT NULL,
FBOPSCALE DECIMAL(33,15) DEFAULT 0 NOT NULL,
FSHARESCALE DECIMAL(33,15) DEFAULT 0 NOT NULL,
FINVESTDATEGROUP DATETIME,
FINVESTDATE DATETIME,
FINVESTAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FREMARK NVARCHAR(500) DEFAULT ' ' NOT NULL,
FISOUT CHAR(1) DEFAULT '0' NOT NULL,
FISCONTROL CHAR(1) DEFAULT '0' NOT NULL,
FISFIRST CHAR(1) DEFAULT '0' NOT NULL,
FISSAMEMON CHAR(1) DEFAULT '0' NOT NULL,
FCHANGETYPE VARCHAR(2) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_INVSHARERELA_RPT_L') 
 CREATE TABLE T_BCM_INVSHARERELA_RPT_L (
FPKID VARCHAR(30) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(500) DEFAULT ' ' NOT NULL
);



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