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: parameterized views

Re: parameterized views

From: Ernest Morariu <ernest_at_gesora.com>
Date: Tue, 10 Aug 2004 17:59:39 +0200
Message-ID: <cfar9o$fv3$1@grillo.cs.interbusiness.it>


Galen,

> What would that be and how would you use it?

I think you are right: it would be nothing. I think the answer for my problem is the "table function".

Galen, please tell me if following "template" could be good for creating a tabel function :

  1. create a new object type(MyRowType) representing a row of the I want to return to the client(ADO)
  2. define the function this way :

CREATE FUNCTION MyFunction (someParam...) RETURN MyRowType PIPELINED IS
cursor myCursor is Select somefields FROM SomeTable WHERE someCondition(someParam);
sourceRow myCursor%ROWTYPE;
outRow MyRowType ;
BEGIN
    for sourceRow in myCursor
    loop

        outRow := MyRowType(sourceRow.Field1,sourceRow.Field2,...);
        PIPE ROW (outRow);

    end loop;
return;
end;

Is there some other simplier way to do the same thing ?

Thank you,
ernest

"Galen Boyer" <galenboyer_at_hotpop.com> wrote in message news:uwu07f2qi.fsf_at_standardandpoors.com...
> On Tue, 10 Aug 2004, ernest_at_gesora.com wrote:
> > Hi !
> >
> > Is it possible in Oracle to create a parameterized view ?
>
> What would that be and how would you use it?
>
> --
> Galen Boyer
Received on Tue Aug 10 2004 - 10:59:39 CDT

Original text of this message

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