/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_constraint.sql **/
EXEC p_DropIdx 'IDX_TCCIT_PREFERENTIAL_ITEM_L_0', 'T_TCCIT_PREFERENTIAL_ITEM_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_PREFERENTIAL_ITEM_L') CREATE  CLUSTERED INDEX IDX_TCCIT_PREFERENTIAL_ITEM_L ON T_TCCIT_PREFERENTIAL_ITEM_L ( FID ,FLOCALEID );

 EXEC P_ALTERPK 'PK_TCCIT_INCRED_ACCDETAIL', 'T_TCCIT_INCRED_ACCDETAIL', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_INCRED_ACCDETAIL') CREATE  CLUSTERED INDEX IDX_TCCIT_INCRED_ACCDETAIL ON T_TCCIT_INCRED_ACCDETAIL ( FTAXACCOUNTSERIALNO );


 EXEC P_ALTERPK 'PK_TCCIT_INCRED_SUMMARY', 'T_TCCIT_INCRED_SUMMARY', 'FID', '0';

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


 EXEC P_ALTERPK 'PK_TCCIT_NONTAX_ACCDETAIL', 'T_TCCIT_NONTAX_ACCDETAIL', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_NONTAX_ACCDETAIL') CREATE  CLUSTERED INDEX IDX_TCCIT_NONTAX_ACCDETAIL ON T_TCCIT_NONTAX_ACCDETAIL ( FTAXACCOUNTSERIALNO );


 EXEC P_ALTERPK 'PK_TCCIT_TREDUCE_ACCDETAIL', 'T_TCCIT_TREDUCE_ACCDETAIL', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_TREDUCE_ACCDETAIL') CREATE  CLUSTERED INDEX IDX_TCCIT_TREDUCE_ACCDETAIL ON T_TCCIT_TREDUCE_ACCDETAIL ( FTAXACCOUNTSERIALNO );


 EXEC P_ALTERPK 'PK_TCCIT_NONTAX_SUMMARY', 'T_TCCIT_NONTAX_SUMMARY', 'FID', '0';

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


 EXEC P_ALTERPK 'PK_TCCIT_TREDUCED_SUMMARY', 'T_TCCIT_TREDUCED_SUMMARY', 'FID', '0';

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


 EXEC P_ALTERPK 'PK_TCCIT_TAXPAY_SUMMARY', 'T_TCCIT_TAXPAY_SUMMARY', 'FID', '0';

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



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