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

 EXEC P_ALTERPK 'PK_T_IM_INV_REALBALANCE_A', 'T_IM_INV_REALBALANCE_A', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_BAL_FABQ') CREATE INDEX IDX_IM_BAL_FABQ ON T_IM_INV_REALBALANCE_A ( FAVBBASEQTY ); 


EXEC p_DropIdx 'IDX_IM_INVBC_ORG_PD_ENDP_ML', 'T_IM_INVBALANCE';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_INVBC_FORGFB') CREATE INDEX IDX_IM_INVBC_FORGFB ON T_IM_INVBALANCE ( FORGID ,FBALANCETYPE );


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