Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Use an associative array with IN clause

user12020272Jan 7 2011 — edited Jan 10 2011
Hello,
I'm trying to do something like this:

declare
l_items parse_pkg.items_tt;
type numbers is table of number;
n numbers;
org varchar2(100) := '1|2|3|4';
begin
l_items := string_to_list(org); --string_to_list is Steve Feuerstein function returning items_tt, a table of varchar2s
select org bulk collect into n from org_table
where org in table(l_items);
end;

This seems like it should work when I look at http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:210612357425
I'm sure someone understands what I'm trying to do, and can point me to the light.
Thanks!
This post has been answered by Solomon Yakobson on Jan 7 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 7 2011
Added on Jan 7 2011
5 comments
9,646 views