The SELECT PUNIT_PLAN_ID INTO nextPunitPlanID FROM AMS_BT_UNIT_BATCH_PLAN bt
LEFT the JOIN AMS_MM_UNIT unit ON bt. PUNIT_ID=unit.and PUNIT_ID
LEFT the JOIN AMS_MM_PROCESSES proce ON unit.and PROCESSESID=proce. PROCESSESID
WHERE MODULAR_BATCH_PLAN_ID=modularPlanID
AND proce. UER_DEFINED1=
(SELECT proce. UER_DEFINED1 + 1 FROM AMS_BT_UNIT_BATCH_PLAN bt
LEFT the JOIN AMS_MM_UNIT unit ON bt. PUNIT_ID=unit.and PUNIT_ID
LEFT the JOIN AMS_MM_PROCESSES proce ON unit.and PROCESSESID=proce. PROCESSESID
WHERE PUNIT_PLAN_ID=punitPlanID);
CodePudding user response:
Now it is slow or no data, and the outside relation you have connectionCodePudding user response: