Tuesday, March 20, 2012

Associative array

I have a variable declared as this:
type ltype_Queue is table of NUMBER index by binary_integer;
l_Queue ltype_Queue;
How can I accomplish the equivalent to this:
select *
from Items
where ID in l_Queue
Thanks,
Layneselect *
from Items
where ID in (select * from TABLE(cast(l_Queue as myTableType)));

where myTableType is a data type defined as below :
create type myTableType as table of varchar2(255)
/

Originally posted by lrobin3
I have a variable declared as this:
type ltype_Queue is table of NUMBER index by binary_integer;
l_Queue ltype_Queue;

How can I accomplish the equivalent to this:

select *
from Items
where ID in l_Queue

Thanks,
Layne

No comments:

Post a Comment