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 -> Re: View with a parameter

Re: View with a parameter

From: Volker Hetzer <volker.hetzer_at_ieee.org>
Date: Tue, 11 Mar 2003 19:54:11 +0100
Message-ID: <b4lbck$3gc$1@dackel.pdb.sbs.de>

"Jusung Yang" <JusungYang_at_yahoo.com> wrote in message news:130ba93a.0303110946.581f8a54_at_posting.google.com...
> Wim de Lange <w.delange_at_alcontrol.nl_nospam> wrote in message news:<MPG.18d7c393260f37379896f8_at_news.euronet.nl>...
> > For reporting purposes I want to define a crosstab view as follows:
> >
> > select 1+floor((rownum-1)/3) as rownumber,
> > max(decode( mod(rownum,3), 1, article_id, null)) as col1,
> > max(decode( mod(rownum,3), 2, article_id, null)) as col2,
> > max(decode( mod(rownum,3), 0, article_id, null)) as col3
> > from (select article_id from article where order_id=6 order by name)
> > group by floor((rownum-1)/3)
> >
> > In this view the part "order_id = 6" is the "parameter" of this view. Is
> > it possible to define a parameter in a view? So that I can pass the
> > information about the order I want to this view?
>
> Not really. But there is a workaround I am aware of:
>
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=130ba93a.0211121307.2ae47856%40posting.google.com
>
> - Jusung Yang

Can you use pipelined functions?
There's a nice example in the app developers fundamentals guide (page 9-71). The end result is something like select * from TABLE(my_function(MyParameter)).

Greetings!
Volker Received on Tue Mar 11 2003 - 12:54:11 CST

Original text of this message

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