/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_constraint.sql **/
 EXEC P_ALTERPK 'PK_TCCIT_ZCTZ_EXPENSE_DET', 'T_TCCIT_ZCTZ_EXPENSE_DET', 'FID', '0';

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


 EXEC P_ALTERPK 'PK_TCCIT_DEV_JJKC', 'T_TCCIT_DEV_JJKC', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_DEV_JJKC') CREATE INDEX IDX_TCCIT_DEV_JJKC ON T_TCCIT_DEV_JJKC ( FORGID ,FYEAR );


 EXEC P_ALTERPK 'PK_TCCIT_DEV_JJKC_A', 'T_TCCIT_DEV_JJKC_A', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_DEV_JJKC_A') CREATE INDEX IDX_TCCIT_DEV_JJKC_A ON T_TCCIT_DEV_JJKC_A ( FWTJNJGHGRYFFSFY );


 EXEC P_ALTERPK 'PK_TCCIT_ZCTZ_EXPENSE_SUM', 'T_TCCIT_ZCTZ_EXPENSE_SUM', 'FID', '0';

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


 EXEC P_ALTERPK 'PK_TCCIT_HZDG_TSSXTZ_SUM', 'T_TCCIT_HZDG_TSSXTZ_SUM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_SEFT_FZJG_ENTRY', 'T_TCCIT_SEFT_FZJG_ENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_SEFT_FZJG_ENTRY_FK') CREATE INDEX IDX_TCCIT_SEFT_FZJG_ENTRY_FK ON T_TCCIT_SEFT_FZJG_ENTRY ( FID );


 EXEC P_ALTERPK 'PK_TCCIT_SEFT_FZJG_SUM', 'T_TCCIT_SEFT_FZJG_SUM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_SEFT_HZNSQY_SUM', 'T_TCCIT_SEFT_HZNSQY_SUM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_JMSD_MIDD_APITUDE', 'T_TCCIT_JMSD_MIDD_APITUDE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_NONTAX_SUMMARY_M', 'T_TCCIT_NONTAX_SUMMARY_M', 'FID', '1';

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



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