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
| declare | |
| v_result_count number := 0; | |
| v_ids varchar2(2000) := '1234,0987'; | |
| begin | |
| select count(*) into v_result_count from | |
| (select trim(regexp_substr(v_ids, '[^,]+', 1, rownum)) id from dual | |
| connect by level <= length (regexp_replace (v_ids, '[^,]+')) + 1) split | |
| where split.id = 1234; | |
| if v_result_count > 0 then |