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

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


 EXEC P_ALTERPK 'PK_TCCIT_DG_B105019_SUM', 'T_TCCIT_DG_B105019_SUM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_DG_B105020_DET', 'T_TCCIT_DG_B105020_DET', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_DG_B105020_SUM', 'T_TCCIT_DG_B105020_SUM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_DG_B105021_DET', 'T_TCCIT_DG_B105021_DET', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_DG_B105021_SUM', 'T_TCCIT_DG_B105021_SUM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_HIGH_TECH_DEVELOP', 'T_TCCIT_HIGH_TECH_DEVELOP', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_HIGH_TECH_INCOME', 'T_TCCIT_HIGH_TECH_INCOME', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_GYXJZ_ACC', 'T_TCCIT_GYXJZ_ACC', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_GYXJZ_ACC') CREATE INDEX IDX_TCCIT_GYXJZ_ACC ON T_TCCIT_GYXJZ_ACC ( FBILLNO );


 EXEC P_ALTERPK 'PK_TCCIT_HIGH_TECH_ACCOUNT', 'T_TCCIT_HIGH_TECH_ACCOUNT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_HIGH_TECH_ACCOUNT') CREATE INDEX IDX_TCCIT_HIGH_TECH_ACCOUNT ON T_TCCIT_HIGH_TECH_ACCOUNT ( FBILLNO );


 EXEC P_ALTERPK 'PK_TCCIT_INVEST_CZ', 'T_TCCIT_INVEST_CZ', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_INVEST_CZ') CREATE INDEX IDX_TCCIT_INVEST_CZ ON T_TCCIT_INVEST_CZ ( FBILLNO );


 EXEC P_ALTERPK 'PK_TCCIT_INVEST_CZ_ENT', 'T_TCCIT_INVEST_CZ_ENT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_GOVDEFER_MIDD', 'T_TCCIT_GOVDEFER_MIDD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_GOVDEFER_MIDD') CREATE INDEX IDX_TCCIT_GOVDEFER_MIDD ON T_TCCIT_GOVDEFER_MIDD ( FBILLNO );


 EXEC P_ALTERPK 'PK_TCCIT_NOTTACC_MIDD', 'T_TCCIT_NOTTACC_MIDD', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_NOTTACC_MIDD') CREATE INDEX IDX_TCCIT_NOTTACC_MIDD ON T_TCCIT_NOTTACC_MIDD ( FBILLNO );



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