Quick & Dirty: Populate number array from string.

March 13, 2018 at 1:09 pm | Posted in Oracle Developement | 2 Comments

Here is a quick way to convert a list of colon separated numbers into a number array:

    l_list_of_numbers  varchar2(32767) := '1:2:3';
    l_string_array     apex_application_global.vc_arr2;
    l_number_array     apex_application_global.n_arr;
    l_string_array := apex_util.string_to_table(l_list_of_numbers); 

    select *
    bulk   collect into l_number_array
    from   table(l_string_array); 

    for idx in 1..l_number_array.count loop
    end loop;



RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Entries and comments feeds.

%d bloggers like this: