/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SFC_constraint.sql **/
 
 EXEC P_ALTERPK 'PK_IM_MDC_MFTAPPLYSUBENTRY', 'T_IM_MDC_MFTAPPLYSUBENTRY', 'FDETAILID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_MDC_MFTRASUBE_FENTRYID') CREATE INDEX IDX_IM_MDC_MFTRASUBE_FENTRYID ON T_IM_MDC_MFTAPPLYSUBENTRY ( FENTRYID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_MDC_MFTRASUBE_FREFSTEID') CREATE INDEX IDX_IM_MDC_MFTRASUBE_FREFSTEID ON T_IM_MDC_MFTAPPLYSUBENTRY (FREFSTOCKENTRYID);
 
/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SFC_constraint.sql **/
