Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> PL/SQL TABLE ARRAY SELECT

PL/SQL TABLE ARRAY SELECT

From: <yarch_at_hotmail.com>
Date: Fri, 21 May 1999 21:15:56 GMT
Message-ID: <7i4iea$e2h$1@nnrp1.deja.com>


How can I create a temporary table in a stored procedure that I can INSERT and SELECT from..or better yet.. select from an array that I've created...

Here's my situation...I created an array using a pl/sql table...

TYPE miketabtype IS TABLE OF number(10) INDEX BY BINARY INTEGER;

miketable miketabtype;

I filled it with customer numbers and now I need to use all the customer numbers in a subselect that's in an IN clause...like this

select ...
from ...
where
  cust_no IN (select * from miketable));

but select doesn't work with a pl/sql table.....i want to do it all in one shot...not loop thru and call it one by one. i can't create a table beforehand....dba won't let me....and i would prefer not to build the sql dynamically and submit it with DBMS_SQL.parse and DBMS_SQL.execute....

I would appreciate any suggestions...
Thanks
Mike
yarch_at_yarch.com

--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Fri May 21 1999 - 16:15:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US