IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PMPD_PROJECT_MCC') 
CREATE TABLE T_PMPD_PROJECT_MCC
(
  FID BIGINT DEFAULT 0 NOT NULL,          	
  FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL, 
  FFULLNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,  
  FNUMBER NVARCHAR(30) DEFAULT ' ' NOT NULL, 	
  FSTATUS NVARCHAR(1) DEFAULT ' ' NOT NULL, 	
  FCREATORID BIGINT DEFAULT 0 NOT NULL,   	
  FMODIFIERID BIGINT DEFAULT 0 NOT NULL,  	
  FENABLE NVARCHAR(1) DEFAULT ' ' NOT NULL, 	
  FCREATETIME DATETIME ,                  	
  FMODIFYTIME DATETIME ,                  	
  FMASTERID BIGINT DEFAULT 0 NOT NULL,    	
  FEPSID BIGINT DEFAULT 0 NOT NULL,       	
  FORGID BIGINT DEFAULT 0 NOT NULL,       	
  FCREATEORGID BIGINT DEFAULT 0 NOT NULL, 	
  FCTRLSTRATEGY NVARCHAR(5) DEFAULT ' ' NOT NULL, 	
  FSOURCEDATAID BIGINT DEFAULT 0 NOT NULL, 	
  FBITINDEX INT DEFAULT 0 NOT NULL,       	
  FSOURCEBITINDEX INT DEFAULT 0 NOT NULL, 	
  FCUSTOMERID BIGINT DEFAULT 0 NOT NULL,  	
  FPJMANAGERID BIGINT DEFAULT 0 NOT NULL, 	
  FPJMGLEVEL NVARCHAR(5) DEFAULT ' ' NOT NULL, 	
  FRESBALLEVEL INT DEFAULT 0 NOT NULL,    	
  FEXPSTARTDATE DATETIME ,                	
  FEXPFINSHDATE DATETIME ,                	
  FCURRENCYID BIGINT DEFAULT 0 NOT NULL,  	
  FESTREVAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL, 	
  FESTCOSTAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL, 	
  FPJTYPEID BIGINT DEFAULT 0 NOT NULL,    	
  FSRCBILLID NVARCHAR(50) DEFAULT ' ' NOT NULL, 	
  FSRCSYS NVARCHAR(50) DEFAULT ' ' NOT NULL, 	
  FSRCBILLENTITY NVARCHAR(50) DEFAULT ' ' NOT NULL, 	
  FAUDITORID BIGINT DEFAULT 0 NOT NULL,   	
  FAUDITDATE DATETIME ,                   	
  FISLEAF CHAR(1) DEFAULT '0' NOT NULL,   	
  FPARENTID BIGINT DEFAULT 0 NOT NULL,    	
  FPJSTATU NVARCHAR(5) DEFAULT ' ' NOT NULL, 	
  FISBDPROJECT CHAR(1) DEFAULT '0' NOT NULL, 	
  FPLANMODE NVARCHAR(5) DEFAULT ' ' NOT NULL, 	
  FPJSTAGEID BIGINT DEFAULT 0 NOT NULL,   	
  FPLANSTARTDATE DATETIME ,               	
  FPLANFINSHDATE DATETIME ,               	
  FPLANSTARTTIME DATETIME ,               	
  FPRESCHEDATE DATETIME ,                 	
  FREALSTARTDATE DATETIME ,               	
  FSCHEATTR NVARCHAR(5) DEFAULT ' ' NOT NULL, 	
  FWORKDAYTYPE NVARCHAR(5) DEFAULT ' ' NOT NULL, 	
  FJOBCOMPPERTYPE NVARCHAR(5) DEFAULT ' ' NOT NULL, 	
  FPERTIMEUNIT NVARCHAR(5) DEFAULT ' ' NOT NULL, 	
  FJOBCODEPREFIX NVARCHAR(50) DEFAULT ' ' NOT NULL, 	
  FJOBCODEPREINCRE DECIMAL(23,10) DEFAULT 0 NOT NULL, 	
  FPJCALEID BIGINT DEFAULT 0 NOT NULL,    	
  FSUMCOST DECIMAL(23,10) DEFAULT 0 NOT NULL, 	
  FLEVEL INT DEFAULT 0 NOT NULL,          	
  FLONGNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL, 	
  FSYNCDATE DATETIME ,                    	
  FREALFINSHDATE DATETIME ,               	
  FACCOUNTORGID BIGINT DEFAULT 0 NOT NULL, 
  FPURCHASEORGID BIGINT DEFAULT 0 NOT NULL, 	
  FSALEORGID BIGINT DEFAULT 0 NOT NULL,   	
  FPRODUCTORGID BIGINT DEFAULT 0 NOT NULL, 	
  FQUALITYORGID BIGINT DEFAULT 0 NOT NULL, 	
  FASSETSORGID BIGINT DEFAULT 0 NOT NULL, 	
  FCAPITALORGID BIGINT DEFAULT 0 NOT NULL, 
  FSHARECENTERID BIGINT DEFAULT 0 NOT NULL, 	
  FHRORGID BIGINT DEFAULT 0 NOT NULL     	
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PMPD_PROJECT_MCC_L') 
CREATE TABLE T_PMPD_PROJECT_MCC_L
(
  FPKID NVARCHAR(255) DEFAULT ' ' NOT NULL,          	
  FID BIGINT DEFAULT 0 NOT NULL,          
  FLOCALEID NVARCHAR(255) DEFAULT ' ' NOT NULL,          
  FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL, 	
  FREMARK NVARCHAR(512) DEFAULT ' ' NOT NULL, 	
  FFULLNAME NVARCHAR(255) DEFAULT ' ' NOT NULL 	
);





