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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_ASSETS_LOSS_DET') CREATE INDEX IDX_TCCIT_ASSETS_LOSS_DET ON T_TCCIT_ASSETS_LOSS_DET ( FORGID ,FSKSSQQ ,FSKSSQZ ,FRULEID ,FENTRYTYPE );


 EXEC P_ALTERPK 'PK_TCCIT_ASSETS_LOSS_SUM', 'T_TCCIT_ASSETS_LOSS_SUM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_NEW_INVEST_ASSET', 'T_TCCIT_NEW_INVEST_ASSET', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_NEW_INVEST_DETAIL', 'T_TCCIT_NEW_INVEST_DETAIL', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_HJZCZJTX_ACCOUNT', 'T_TCCIT_HJZCZJTX_ACCOUNT', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_HJZCZJTX_ACCOUNT') CREATE INDEX IDX_TCCIT_HJZCZJTX_ACCOUNT ON T_TCCIT_HJZCZJTX_ACCOUNT ( FNUMBER );


 EXEC P_ALTERPK 'PK_TCCIT_HJZCZJTX_ACCOUNT_L', 'T_TCCIT_HJZCZJTX_ACCOUNT_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_HJZCZJTX_ACCOUNT_L_0') CREATE INDEX IDX_TCCIT_HJZCZJTX_ACCOUNT_L_0 ON T_TCCIT_HJZCZJTX_ACCOUNT_L ( FENTRYID ,FLOCALEID );



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