Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Can you pass a table name into a stored procedure?

Can you pass a table name into a stored procedure?

From: dean <deanbrown3d_at_yahoo.com>
Date: 7 Dec 2005 13:46:09 -0800
Message-ID: <1133991969.265691.139420@g49g2000cwa.googlegroups.com>


We have a set of tables (all the same structure) called EXPAND_ROUTE_001, EXPAND_ROUTE_002, .... to EXPAND_ROUTE_010.

I need to write a stored proc that can join to one of these tables selected by the user of an application, at runtime. Is there a simple way to do this? I cannot seem to be able to pass in the name of the table as a parameter, which makes sense I guess, but I would like a trick to get this to work.

I know how to do this with a cursor/function combo, but was wondering if there is a simple way of doing this.

Thanks!

Dean Received on Wed Dec 07 2005 - 15:46:09 CST

Original text of this message

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