1 | initial version |
One way to send multiple comma-separated names as parameters in Oracle concurrent program is by using a delimited string value.
For example, in the program parameter definition, set the parameter type as Character and specify the Delimited type as Comma-separated. Then, in the value field, enter the comma-separated list of names with the format of first name and last name separated by a comma.
When the concurrent program is run, the program code can retrieve the parameter value as a string and parse it using the comma as a delimiter to get individual names. The following is an example code snippet to extract names from the delimited string:
DECLARE vnames VARCHAR2(4000) := :PNAMES; vnamearray apexapplicationglobal.vcarr2; BEGIN -- convert delimited string to array vnamearray := apexutil.stringtotable(v_names, ',');
-- loop through each name and extract first and last names FOR i IN 1..vnamearray.count LOOP vfirstname := substr(vnamearray(i), 1, instr(vnamearray(i), ',')-1); vlastname := substr(vnamearray(i), instr(vnamearray(i), ',')+1);
-- do further processing with the extracted names
...
END LOOP; END;