I'm looking for a most efficient way to implement PL/SQL block with dynamic data.
For example in the following block there might be different App_profile_Type rows (with various values).
Should I prepare $statement with whole block (by concatenating $statement in loop) or there is a better way to do it ?
Declare
P_APP_ROW App_profile_Type_tab;
v_Return BOOLEAN;
BEGIN
---
--- Initiate Application profile
---
P_APP_ROW :=
App_profile_Type_tab (
App_profile_Type('JSYSTEM_1007','','',2,'1','0',1,1,1,'0',NULL,NULL,NU
+LL),
....
....
);
V_Return := APP_PROFILE_LOADER.Load_profile( P_APP_ROW => P_APP_ROW);
IF (v_Return) THEN
DBMS_OUTPUT.PUT_LINE('v_Return = ' || 'TRUE');
commit;
ELSE
DBMS_OUTPUT.PUT_LINE('v_Return = ' || 'FALSE');
rollback;
END IF;
END;
/