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

 EXEC P_ALTERPK 'PK_T_IM_MATERDEFAULTWH', 'T_IM_MATERDEFAULTWH', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MATERDEFAUL_ORGMATER') CREATE INDEX IDX_MATERDEFAUL_ORGMATER ON T_IM_MATERDEFAULTWH ( FORGID ,FMATERIALID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MATERDEFAULT_MGRP') CREATE INDEX IDX_MATERDEFAULT_MGRP ON T_IM_MATERDEFAULTWH ( FMATERIALGROUPID );

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