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

Home -> Community -> Usenet -> c.d.o.misc -> Using bulk collect with union-statement

Using bulk collect with union-statement

From: lemmchen <lemmi.lemmchen_at_gmx.net>
Date: 25 Jul 2005 07:30:27 -0700
Message-ID: <1122301827.919397.312740@g43g2000cwa.googlegroups.com>


Hello,

I have stored procedure with a statement like this:

TYPE mylist IS TABLE OF table%ROWTYPE;
enums mylist ;

select name from table
where ...
union
select name from table
where ..

I want to put result using BULK COLLECT INTO into enums -collection. But when try this with my union-statement, always a get an error.

How can I do this ?
Putting both statements together for eliminate union could be an option, but the "real" statement is very difficult and I have some similiar statements. With union the statement is more clear.

Thanks a lot. Received on Mon Jul 25 2005 - 09:30:27 CDT

Original text of this message

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