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 -> Re: Can you pass a table name into a stored procedure?

Re: Can you pass a table name into a stored procedure?

From: dean <deanbrown3d_at_yahoo.com>
Date: 7 Dec 2005 21:06:49 -0800
Message-ID: <1134018409.514625.291420@o13g2000cwo.googlegroups.com>


It was not my design, there are already 10 tables, 20 in some instances. I pushd strongly for partitioning, but we did not use partitioning because our client did not have that enabled in their oracle system. We will look into it some time soon though, but until then we are stuck with 10 tables. The reason was that its faster to truncate a table than delete from it.

I don't have oracle here at home, but I'm wondering if I can do something like this:

with CURRENT_EXPAND_ROUTE as
(
  case TABLE_INDEX of

  when 1: select A, B, C, D, E from EXPAND_ROUTE_001
  when 2: select A, B, C, D, E from EXPAND_ROUTE_002
  when 3: select A, B, C, D, E from EXPAND_ROUTE_003
  ...
  else select A, B, C, D, E from EXPAND_ROUTE_010 ) .. do something with CURRENT_EXPAND_ROUTE

I'll try this tomorrow. Thanks all!

Dean Received on Wed Dec 07 2005 - 23:06:49 CST

Original text of this message

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