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