/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\IM_constraint.sql **/
 EXEC P_ALTERPK 'PK_IM_BAL_RECAL_LOG', 'T_IM_BAL_RECAL_LOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_RECAL_LOG_TIMENO') CREATE INDEX IDX_IM_RECAL_LOG_TIMENO ON T_IM_BAL_RECAL_LOG ( FTASKNO );


 EXEC P_ALTERPK 'PK_IM_BAL_RECAL_POINT', 'T_IM_BAL_RECAL_POINT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_RECAL_RULE') CREATE INDEX IDX_IM_RECAL_RULE ON T_IM_BAL_RECAL_POINT ( FRULEID );


 EXEC P_ALTERPK 'PK_IM_INVBAL_OPLOG', 'T_IM_INVBAL_OPLOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_RECAL_TIME') CREATE INDEX IDX_IM_RECAL_TIME ON T_IM_INVBAL_OPLOG ( FOPTIME );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_RECAL_OP') CREATE INDEX IDX_IM_RECAL_OP ON T_IM_INVBAL_OPLOG ( FOP );



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