/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\IM_constraint.sql **/
EXEC p_DropIdx 'IDX_IM_CAL_PBAL_KEYPER', 'T_IM_CAL_PER_BAL';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_CAL_PBAL_PERKEY') CREATE UNIQUE INDEX IDX_IM_CAL_PBAL_PERKEY ON T_IM_CAL_PER_BAL ( FPERIOD ,FKEYCOL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_CAL_PBAL_KEY') CREATE INDEX IDX_IM_CAL_PBAL_KEY ON T_IM_CAL_PER_BAL ( FKEYCOL );

EXEC p_DropIdx 'IDX_IM_INV_PBAL_KEYPER', 'T_IM_INV_PER_BAL';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_INV_PBAL_PERKEY') CREATE UNIQUE INDEX IDX_IM_INV_PBAL_PERKEY ON T_IM_INV_PER_BAL ( FPERIOD ,FKEYCOL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_INV_PBAL_KEY') CREATE INDEX IDX_IM_INV_PBAL_KEY ON T_IM_INV_PER_BAL ( FKEYCOL );


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