/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MDS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MDS_RPLANCAL') 
 CREATE TABLE T_MDS_RPLANCAL (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS NVARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FMODIFYTIME DATETIME,
FCREATETIME DATETIME,
FORGID BIGINT DEFAULT 0 NOT NULL,
FPREDVERSION BIGINT DEFAULT 0 NOT NULL,
FSOURCETYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSOURCENAME BIGINT DEFAULT 0 NOT NULL,
FDTYPE BIGINT DEFAULT 0 NOT NULL,
FCHANGEWAY NVARCHAR(30) DEFAULT ' ' NOT NULL,
FAMOUNTTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSTART DATETIME,
FEND DATETIME,
FDEDUCT_H BIGINT DEFAULT 0 NOT NULL,
FDEDUCT_T BIGINT DEFAULT 0 NOT NULL,
FMOD DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDEDUCT CHAR(1) DEFAULT ' ' NOT NULL,
FCALSTATUS NVARCHAR(30) DEFAULT ' ' NOT NULL,
FREPEAT CHAR(1) DEFAULT ' ' NOT NULL,
FJOBID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPLANID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDAYSOFWEEK NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDAYSOFMON NVARCHAR(100) DEFAULT ' ' NOT NULL,
FRUNNINGTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FREPEATTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FLOSEDATE DATETIME,
FPREDTIME BIGINT DEFAULT 0 NOT NULL,
FISQUOTA CHAR(1) DEFAULT ' ' NOT NULL,
FSTYPE BIGINT DEFAULT 0 NOT NULL,
FPLANGRP BIGINT DEFAULT 0 NOT NULL,
FOPENLV BIGINT DEFAULT 0 NOT NULL,
FRUNNINGLOG NVARCHAR(500) DEFAULT ' ' NOT NULL
);



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