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 -> Building temporary result set in PL/SQL

Building temporary result set in PL/SQL

From: Morten <usenet_at_kikobu.com>
Date: Mon, 13 May 2002 11:26:55 +0200
Message-ID: <3CDF86DF.3060903@kikobu.com>

Hi. Can someone point me in the right direction on how I programatically build a result set in PL/SQL? I could insert into a temporary table and select * from that, but can I not avoid the temporary table?

I'm not quite sure what to look for in the documentation. In effect, what I'm looking for, is an alternative to the below routine, that does not use inserts, but returns the output relation.

declare
cursor c is
select /*+ FIRST_ROWS */ id, score(1) from table_a where contains(content, '((test%)*(1/10))', 1) > 0 order by score(1) desc;
begin
for i in c
loop

INSERT INTO temp_table(id, score) ...

exit when c%rowcount > 21;
end loop;
end;
/

Thanks,

Morten Received on Mon May 13 2002 - 04:26:55 CDT

Original text of this message

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