/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_INCRED_ACCDETAIL' AND KSQL_COL_NAME ='FTABLE') 
 ALTER TABLE T_TCCIT_INCRED_ACCDETAIL ADD (FTABLE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_INCRED_ACCDETAIL' AND KSQL_COL_NAME ='FAMOUNTFIELD') 
 ALTER TABLE T_TCCIT_INCRED_ACCDETAIL ADD (FAMOUNTFIELD BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_NONTAX_ACCDETAIL' AND KSQL_COL_NAME ='FTABLE') 
 ALTER TABLE T_TCCIT_NONTAX_ACCDETAIL ADD (FTABLE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_NONTAX_ACCDETAIL' AND KSQL_COL_NAME ='FAMOUNTFIELD') 
 ALTER TABLE T_TCCIT_NONTAX_ACCDETAIL ADD (FAMOUNTFIELD BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_TREDUCE_ACCDETAIL' AND KSQL_COL_NAME ='FTABLE') 
 ALTER TABLE T_TCCIT_TREDUCE_ACCDETAIL ADD (FTABLE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_TREDUCE_ACCDETAIL' AND KSQL_COL_NAME ='FAMOUNTFIELD') 
 ALTER TABLE T_TCCIT_TREDUCE_ACCDETAIL ADD (FAMOUNTFIELD BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_QYSDS_JDTBXX') 
 CREATE TABLE T_TCCIT_QYSDS_JDTBXX (
FID BIGINT DEFAULT 0 NOT NULL,
FEWBLXH VARCHAR(30) DEFAULT ' ' NOT NULL,
FEWBLNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FSBBID VARCHAR(50) DEFAULT ' ' NOT NULL,
FZCZE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCYRS DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_QYSDS_A000000_GD' AND KSQL_COL_NAME ='FGUOJI') 
 ALTER TABLE T_TCCIT_QYSDS_A000000_GD ADD (FGUOJI VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_QYSDS_ZB' AND KSQL_COL_NAME ='FFHTJXWQYSDSE') 
 ALTER TABLE T_TCCIT_QYSDS_ZB ADD (FFHTJXWQYSDSE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_QYSDS_ZB' AND KSQL_COL_NAME ='FYHJNSDS') 
 ALTER TABLE T_TCCIT_QYSDS_ZB ADD (FYHJNSDS VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_QYSDS_MSYHMX_A') 
 CREATE TABLE T_TCCIT_QYSDS_MSYHMX_A (
FID BIGINT DEFAULT 0 NOT NULL,
FTZSYMZQYSDS DECIMAL(23,10) DEFAULT 0 NOT NULL,
FXGBDFYJZZCKK DECIMAL(23,10) DEFAULT 0 NOT NULL,
FFPJZZCKK DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_QYSDS_JMSDSYH' AND KSQL_COL_NAME ='FHNMYGLQYSDS') 
 ALTER TABLE T_TCCIT_QYSDS_JMSDSYH ADD (FHNMYGLQYSDS DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_QYSDS_JMSDSYH' AND KSQL_COL_NAME ='FQTCHILD2') 
 ALTER TABLE T_TCCIT_QYSDS_JMSDSYH ADD (FQTCHILD2 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_QYSDS_JMSDSYH' AND KSQL_COL_NAME ='FZYYWSRZB') 
 ALTER TABLE T_TCCIT_QYSDS_JMSDSYH ADD (FZYYWSRZB DECIMAL(23,10) DEFAULT 0 NOT NULL );

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