/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_PROFIT_SUMMARY') 
 CREATE TABLE T_TCCIT_PROFIT_SUMMARY (
FID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FBQFSE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBQLJE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSQFSE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSQLJE DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_ASSERT_ACCE_DEPRE' AND KSQL_COL_NAME ='FBNTOTALZZDEPRE') 
 ALTER TABLE T_TCCIT_ASSERT_ACCE_DEPRE ADD (FBNTOTALZZDEPRE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_ASSERT_ACCE_DEPRE' AND KSQL_COL_NAME ='FBNTOTALSFDEPRE') 
 ALTER TABLE T_TCCIT_ASSERT_ACCE_DEPRE ADD (FBNTOTALSFDEPRE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_ASSERT_ACCE_DEPRE' AND KSQL_COL_NAME ='FBNTOTALJSDEPRE') 
 ALTER TABLE T_TCCIT_ASSERT_ACCE_DEPRE ADD (FBNTOTALJSDEPRE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_SEASONAL_POLICY' AND KSQL_COL_NAME ='FTAXPERIOD') 
 ALTER TABLE T_TCCIT_SEASONAL_POLICY ADD (FTAXPERIOD DATETIME );

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