/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_constraint.sql **/
 EXEC P_ALTERPK 'PK_TCCIT_THINKOFSELL_DET', 'T_TCCIT_THINKOFSELL_DET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_THINKOFSELL_DET') CREATE INDEX IDX_TCCIT_THINKOFSELL_DET ON T_TCCIT_THINKOFSELL_DET ( FTAXACCOUNTSERIALNO ,FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_THINKOFSELL_SUM', 'T_TCCIT_THINKOFSELL_SUM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_THINKOFSELL_SUM') CREATE INDEX IDX_TCCIT_THINKOFSELL_SUM ON T_TCCIT_THINKOFSELL_SUM ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_SAME_SOLD_ACCOUNT', 'T_TCCIT_SAME_SOLD_ACCOUNT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_SAME_SOLD_ACCOUNT') CREATE INDEX IDX_TCCIT_SAME_SOLD_ACCOUNT ON T_TCCIT_SAME_SOLD_ACCOUNT ( FORGID );


 EXEC P_ALTERPK 'PK_TCCIT_SALARY_ACCOUNT', 'T_TCCIT_SALARY_ACCOUNT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_SALARY_ACCOUNT') CREATE INDEX IDX_TCCIT_SALARY_ACCOUNT ON T_TCCIT_SALARY_ACCOUNT ( FORG );


 EXEC P_ALTERPK 'PK_TCCIT_INTERTE_DEDUCT', 'T_TCCIT_INTERTE_DEDUCT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_INTERTE_DEDUCT') CREATE INDEX IDX_TCCIT_INTERTE_DEDUCT ON T_TCCIT_INTERTE_DEDUCT ( FORG );


 EXEC P_ALTERPK 'PK_TCCIT_TAX_EQUITY_INCENT', 'T_TCCIT_TAX_EQUITY_INCENT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_TAX_EQUITY_INCENT') CREATE INDEX IDX_TCCIT_TAX_EQUITY_INCENT ON T_TCCIT_TAX_EQUITY_INCENT ( FORGID ,FTAXPERIOD );



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