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: johnston <johnston_at_thot.com>
Date: 17 Jul 2003 09:06:47 -0500
Message-ID: <3f16a55a$0$68854$45beb828@newscene.com>


In article <9vkRa.35$6%5.21_at_news02.roc.ny>, "Anurag Varma" <avdbi_at_hotmail.com> wrote:
>
>"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
>
>

the problem is that there might be a complex join and we have to add the new where clause to that. The sql is different throughtout so that will not work, it will be a editing problem Received on Thu Jul 17 2003 - 09:06:47 CDT

Original text of this message

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