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 -> Question on the BULK COLLECT by a cursor using a database link

Question on the BULK COLLECT by a cursor using a database link

From: cschang <cschang_at_maxinter.net>
Date: Fri, 18 Jul 2003 22:28:21 -0400
Message-ID: <3F18ACC4.E4552E2D@maxinter.net>


System: 8.1.6 on NT 4 w/ sp6a 6 HD PIII CPU and 1G RAM In my procedure, I have a query to use remote database link to the data source. I defined the query by a cursor. According to Tom and Oracle knowledge, the FETCH … BULK COLLECT INTO won’t work with the query using the database link. Tom suggested to define a new array datatype something as:
create or replace type vcArray as table of varchar2(35); /
and a query such as
 select cast( multiset( select username

             from all_users_at_ora8i.world
             where rownum <= 10 ) as vcArray )
 into l_data
 from dual;
to obtain all the records at once.
My question is : because the vcArray type is an one-dimensional array type, how can I apply such trick for querying records of multiple columns?
I have tried without success. Do I have to write there separated CAST( MULTISET (…) in the outer SELECT..? It does not sound right. Can any one give a hint? Thanks.

C Chang Received on Fri Jul 18 2003 - 21:28:21 CDT

Original text of this message

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