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

Home -> Community -> Usenet -> c.d.o.tools -> dynamic table name

dynamic table name

From: R. Chuck Matthews <matthews_chuck_at_bah.com>
Date: 2000/08/04
Message-ID: <398B523E.AD5080E1@bah.com>#1/1

I would like to be able to write a generic select statement where I can pass in data elements and a tablename. Example:

IS

tableName varchar2(10);
dataElements varchar2(60);

tableName := getTableName(arg);
dataElements := getDataElements(args);

// dataElements could have "element1,element2,element3,element4".
//tableName could have "msgType"

select dataElements from tableName where ...

Can this be done??? If so, how???

--
R. Chuck Matthews
Associate
BOOZ-ALLEN & HAMILTON INC.

Office: (703) 908-4322
Fax:    (703) 908-4344
email:  matthews_chuck_at_bah.com
Received on Fri Aug 04 2000 - 00:00:00 CDT

Original text of this message

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