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 -> Re: dynamic table name

Re: dynamic table name

From: Tom Best <tom.best_at_bentley.com>
Date: 2000/08/07
Message-ID: <8mmedt$d26$1@news.bentley.com>#1/1

Chuck:

Look into the PL/SQL package DBMS_SQL. It lets you submit dynamic SQL - either DML or a select statement as a cursor.

HTH,
Tom Best

R. Chuck Matthews <matthews_chuck_at_bah.com> wrote in message news:398B523E.AD5080E1_at_bah.com...
> 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".
> file://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 Mon Aug 07 2000 - 00:00:00 CDT

Original text of this message

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