/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HPDI_constraint.sql **/
 EXEC P_ALTERPK 'PK_HPDI_COLLATASK_L', 'T_HPDI_COLLATASK_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HPDI_COLLATASK_L' AND KSQL_INDNAME = 'IDX_HPDI_COLLATASK_L') CREATE INDEX IDX_HPDI_COLLATASK_L ON T_HPDI_COLLATASK_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_HPDI_COLLATASKENT', 'T_HPDI_COLLATASKENT', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HPDI_COLLATASKENT' AND KSQL_INDNAME = 'IDX_HPDI_COLLATASKENT') CREATE INDEX IDX_HPDI_COLLATASKENT ON T_HPDI_COLLATASKENT ( FID );


 EXEC P_ALTERPK 'PK_HPDI_COLLATASK', 'T_HPDI_COLLATASK', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HPDI_COLLATASK' AND KSQL_INDNAME = 'IDX_HPDI_COLLATASK') CREATE INDEX IDX_HPDI_COLLATASK ON T_HPDI_COLLATASK ( FORGMSGRECVCENTERID );


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