Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: View with a parameter
You can use application context to have a parameter to a view. Still I
think in this case just use it like a table and put the spec in the where
statement, much more direct.
Jim
-- Replace part of the email address: kennedy-down_with_spammers_at_attbi.com with family. Remove the negative part, keep the minus sign. You can figure it out. "Scott Mattes" <Scott_at_TheMattesFamily.ws> wrote in message news:4flba.59$cG1.93149_at_news1.news.adelphia.net...Received on Tue Mar 11 2003 - 09:12:03 CST
> A view is like a table, so make your view without the where/order by and
> when you want to view the
> data you do
>
> select *
> from my_view
> where <whatever>
> order by <whatever else>
>
>
> "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?
> >
> > --
> >
> > Groetjes,
> > Wim de Lange
>
>