Skip to content

Instantly share code, notes, and snippets.

@r-trigo
Last active February 9, 2017 17:50
Show Gist options
  • Save r-trigo/ec16f2d27064e8f8157c7c096ab09757 to your computer and use it in GitHub Desktop.
Save r-trigo/ec16f2d27064e8f8157c7c096ab09757 to your computer and use it in GitHub Desktop.
Regexp_substr for ids_array in varchar2
SELECT regexp_substr('[1,2,3,4,5,6]', '[^],]+', 2, level) AS id_filmes
FROM dual
CONNECT BY regexp_substr('[1,2,3,4,5,6]', '[^],]+', 2, level) IS NOT NULL;
com variável:
SELECT regexp_substr(p_ids_filmes, '[^],]+', 2, level) AS id_filmes
FROM dual
CONNECT BY regexp_substr(p_ids_filmes, '[^],]+', 2, level) IS NOT NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment