Insert the possible combinations of two arrays in to another array in PLSQL
by Zubair
(Bangalore, India)
I have two arrays Course and time. I am trying to create another array with all the possible combinations of these two arrays. For eg:
DECLARE type course_array IS table of number;
type time_array IS table of number;
type combination_array is table of number;
Course_pref course_array;
Time_pref time_array;
combination combination_array;
BEGIN
Course_pref := course_array(1, 2, 4);
Time_pref:= time_array(1, 2, 3, 5);
I want the an array which would look like
combination:= combination_array((1,1),(1,2),(1,4),(2,1),(2,2),(2,4)......)