Created
September 4, 2013 17:14
-
-
Save phantom42/6439932 to your computer and use it in GitHub Desktop.
oracle - select in string list argument. from https://blogs.oracle.com/aramamoo/entry/how_to_split_comma_separated_string_and_pass_to_in_clause_of_select_statement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM table a | |
WHERE A.column_name IN ( | |
SELECT REGEXP_SUBSTR('1,2,3','[^,]+', level) FROM dual | |
CONNECT BY REGEXP_SUBSTR('1,2,3', '[^,]+', level) is not null | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment