/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_TCCIT_ITEM_ENTRY', 'T_TCCIT_ITEM_ENTRY', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_ITEM_ENTRY') CREATE  CLUSTERED INDEX IDX_TCCIT_ITEM_ENTRY ON T_TCCIT_ITEM_ENTRY ( FID );


 EXEC P_ALTERPK 'PK_TCCIT_SHARING', 'T_TCCIT_SHARING', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_SHARING_FK') CREATE  CLUSTERED INDEX IDX_TCCIT_SHARING_FK ON T_TCCIT_SHARING ( FID );


 EXEC P_ALTERPK 'PK_TCCIT_SHARING_EDIT', 'T_TCCIT_SHARING_EDIT', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_SHARING_EDIT') CREATE  CLUSTERED INDEX IDX_TCCIT_SHARING_EDIT ON T_TCCIT_SHARING_EDIT ( FORGID );


 EXEC P_ALTERPK 'PK_TCCIT_SHARING_L', 'T_TCCIT_SHARING_L', 'FPKID', '0';

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


 EXEC P_ALTERPK 'PK_T_TCCIT_SHARING_ORGS', 'T_TCCIT_SHARING_ORGS', 'FDETAILID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_SHARING_ORGS') CREATE  CLUSTERED INDEX IDX_TCCIT_SHARING_ORGS ON T_TCCIT_SHARING_ORGS ( FENTRYID );


 EXEC P_ALTERPK 'PK_TCCIT_SHARING_RULES', 'T_TCCIT_SHARING_RULES', 'FDETAILID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_SHARING_RULES_FK') CREATE  CLUSTERED INDEX IDX_TCCIT_SHARING_RULES_FK ON T_TCCIT_SHARING_RULES ( FENTRYID );



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