/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BASE_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_CUSTOMER_CREATEORG') CREATE INDEX IDX_T_BD_CUSTOMER_CREATEORG ON T_BD_CUSTOMER ( FCREATEORGID );

EXEC p_DropIdx 'IDX_T_BD_MATERIAL_SP', 'T_BD_MATERIAL';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_MATERIAL_GROUP') CREATE INDEX IDX_T_BD_MATERIAL_GROUP ON T_BD_MATERIAL ( FGROUPID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_MATERIAL_CREATEORG') CREATE INDEX IDX_T_BD_MATERIAL_CREATEORG ON T_BD_MATERIAL ( FCREATEORGID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_SUPPLIER_CREATEORG') CREATE INDEX IDX_T_BD_SUPPLIER_CREATEORG ON T_BD_SUPPLIER ( FCREATEORGID );


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