/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BASE_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_CUSWHITESTATUS') 
 CREATE TABLE T_BD_CUSWHITESTATUS (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_SUPWHITESTATUS') 
 CREATE TABLE T_BD_SUPWHITESTATUS (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_BILLQUERYCONTROL') 
 CREATE TABLE T_BD_BILLQUERYCONTROL (
FID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FSTATUS VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FBASEDATATYPE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FOBJECT NVARCHAR(100) DEFAULT ' ' NOT NULL,
FLIFECYCLE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FLIFECYCLEPROPERTY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FISPRESET CHAR(1) DEFAULT '0' NOT NULL
);



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