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 -> Re: can I use a pl/sql cursor as subquery or in another cursor?

Re: can I use a pl/sql cursor as subquery or in another cursor?

From: Matthias Rogel <rogel_at_web.de>
Date: Mon, 11 Nov 2002 07:44:38 +0100
Message-ID: <aqnjkm$bl5ir$1@ID-86071.news.dfncis.de>


Well, I think, the problems with views is that there isn't a thing like parameterized views.

I hope with Peter, that somedays, there will ... (@ least in Oracle)

Matthias

Robbert Van der Hoorn wrote:

> May be you could try to use views...
> 
> 
> "Peter Mutsaers" <plm_at_gmx.li> schreef in bericht
> news:873cqcm3vd.fsf_at_muon.mutsaers.com...
> 

>>Is it possible (in oracle 9i) to somehow use a cursor as subquery or
>>in another cursor, in order to reuse parts of queries or to build
>>complex queries modularly without resorting to dynamic sql?
>>
>>I thought maybe oracle 9i new pipelined functions or cursor() operator
>>might provide something, but I couldn't really figure out how.
>>
>>I'd like something like this (in a package):
>>
>>cursor abc(p1 in varchar2) is select a,b,c from tababc where d = p1;
>>
>>cursor sumabc(p1 in varchar2) is
>> select a,sum(c) from (abc(p1)) group by a;
>>
>>
>>It really drives me mad (being used to other computer languages where
>>you can build using bottom-up or top-down breakdown) that I don't know
>>how to avoid copying blocks of SQL for such cases. It must be possible
>>in some way (I hope) to modularize sql statements???
>>
>>
>>--
>>Peter Mutsaers, Dübendorf, Switzerland.
> 
> 
> 
Received on Mon Nov 11 2002 - 00:44:38 CST

Original text of this message

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