This content has been marked as final. Show 4 replies
Dear Abo Yahya,
I assume that you are using tabular form.
You missed the COMMIT and I would write the code as following:
Please, if this answers your question, mark it as Correct otherwise as helpful
BEGIN for i in 1..apex_application.g_f01.count loop If apex_application.g_f31(apex_application.g_f01(i)) IS NOT NULL THEN UPDATE STORAGE_GARD_DET SET ITEM_QNTY = apex_application.g_f33(apex_application.g_f01(i)) WHERE GARD_DET_NO =apex_application.g_f31(apex_application.g_f01(i)); END IF; END LOOP; COMMIT; END;
You missed the COMMIT and I would write the code as following:There is no need for commit statement. APEX commits automatically.
To see what happens, I would add the following statement and look in the debug window (or in the inline debug information for version < 4.0) for the value of "g_f31.COUNT".
DECLARE vrow BINARY_INTEGER; BEGIN wwv_flow.debug('apex_application.g_f31.COUNT="'||apex_application.g_f31.COUNT||'"'); FOR i IN 1 .. apex_application.g_f31.COUNT LOOP ...
thanks for all ..... i am try to use this code and it working well
DECLARE v_updatecount NUMBER := 0; BEGIN FOR i IN 1 .. apex_application.g_f31.COUNT LOOP IF apex_application.g_f31 (i) IS NOT NULL THEN UPDATE STORAGE_GARD_DET SET ITEM_QNTY =apex_application.g_f33 (i) WHERE GARD_DET_NO = apex_application.g_f31 (i); v_updatecount := v_updatecount + 1; END IF; END LOOP; :P119_UPDATE_COUNT := v_updatecount; END;