/**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_SUBELEMENT_MATERIAL') 
 CREATE TABLE T_BD_SUBELEMENT_MATERIAL (
FID BIGINT DEFAULT 0 NOT NULL,
FSUBELEMENTID NVARCHAR(30) DEFAULT ' ' NOT NULL,
FMATERIALID NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCOSTTYPEID NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATERID NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATEDATE DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_SUBELEMENTENTRY') 
 CREATE TABLE T_BD_SUBELEMENTENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATERID BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATE DATETIME,
FSUBELEMENTID BIGINT DEFAULT 0 NOT NULL,
FCOSTTYPEID BIGINT DEFAULT 0 NOT NULL,
FEXPENSEITEMID BIGINT DEFAULT 0 NOT NULL
);



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