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: Using table pipelined functions to get rows from a table?

Re: Using table pipelined functions to get rows from a table?

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Wed, 16 Jul 2003 22:40:05 GMT
Message-ID: <9vkRa.35$6%5.21@news02.roc.ny>

"johnston" <johnston_at_thot.com> wrote in message news:3f1595c4$0$68854$45beb828_at_newscene.com...
> Using Oracle 9i R2 on Sun Starfire running Sun unix 5.6
>
>
> We have the following problem:
>
> we have a table DISTR_CO that have ~10k rows. It is used in web pages and is
> reference in the from clause ~450 times in ~60 pages. We have now added a new
> clolumn that will be part of the primary key (plan_id). that means that
> everyplace where the table is used, we have now add a clause to the Where
> condition (plan_id = x). That is alot of places to change. A
> automatied search and replace will no do it cause there are many places where
> the wording is differenct.
>
> Possible solution.
>
> Replace the table DISTR_CO
> with a table based function -- table( distri_co(x) )
> where i pass the plan id. Therefore a straigth search and replace would do it
>
>
> Can table based functions be used in this way? What i want to do is have it
> return the rows from DISTR_CO where the plan_id = somevalue
>
> so
>
> select * from distr_co where plan_id = x
>
> becomes select * from table(distri_co(x))
>
> Is this possible?

Possible or not .. it however does not make sense to me. Your solution looks like you'll still have to change the select clause in the web pages.
Why not just replace it with a view called distr_co which is select * from distr_co_table where plan_id = x ??? Do you do dml on this table from the web?

Anurag Received on Wed Jul 16 2003 - 17:40:05 CDT

Original text of this message

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