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

Using table pipelined functions to get rows from a table?

From: johnston <johnston_at_thot.com>
Date: 16 Jul 2003 13:15:08 -0500
Message-ID: <3f1595c4$0$68854$45beb828@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? Received on Wed Jul 16 2003 - 13:15:08 CDT

Original text of this message

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