/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SCH_SCHEDULESTATS') 
 CREATE TABLE T_SCH_SCHEDULESTATS (
FID BIGINT DEFAULT 0 NOT NULL,
FSCHEDULEID VARCHAR(36) DEFAULT ' ' NOT NULL,
FTOTALCOUNT INT DEFAULT 0 NOT NULL,
FSUCCESSCOUNT INT DEFAULT 0 NOT NULL,
FFAILCOUNT INT DEFAULT 0 NOT NULL,
FAVERAGECOST INT DEFAULT 0 NOT NULL,
FMOSTCOST INT DEFAULT 0 NOT NULL,
FTOTALCOST INT DEFAULT 0 NOT NULL,
FTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FTIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SCH_TASKNUMSTATS') 
 CREATE TABLE T_SCH_TASKNUMSTATS (
FID BIGINT DEFAULT 0 NOT NULL,
FTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FVALUE INT DEFAULT 0 NOT NULL,
FCOUNT INT DEFAULT 0 NOT NULL,
FJOBTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FTIME DATETIME,
FSTATUS VARCHAR(10) DEFAULT ' ' NOT NULL
);



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