Is there a function to split a string in PL/SQL?

Sam picture Sam · Sep 14, 2010 · Viewed 215.5k times · Source

I need to write a procedure to normalize a record that have multiple tokens concatenated by one char. I need to obtain these tokens splitting the string and insert each one as a new record in a table. Does Oracle have something like a "split" function?

Answer

Tony Andrews picture Tony Andrews · Sep 14, 2010

There is apex_util.string_to_table - see my answer to this question.

Also, prior to the existence of the above function, I once posted a solution here on my blog.

Update

In later versions of APEX, apex_util.string_to_table is deprecated, and a similar function apex_string.split is preferred.