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: Dinamic SQL

Re: Dinamic SQL

From: TurkBear <johng_at_mm.com>
Date: Mon, 25 Oct 1999 14:46:38 GMT
Message-ID: <38146cd3.4335023@super.news-ituk.to>


How are you planning to execute the select statement...

If from SqlPLus than you can write a script the has:

Select * from &tablename

It will prompt you for a table name when run...

with other methods, assign the tablename to a string variable ( varchar2 for example and use it like
select * from :tablename variable

"Starman" <ninomail_at_tin.it> wrote:

>Hi all,
>
>I need to execute a SELECT statement but I want the "FROM table" variable.
>
>for ex. : SELECT * FROM <tablename>;
>
>where tablename is a variable.
>
>Is it possible? If not, is there another way?

  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------    http://www.newsfeeds.com The Largest Usenet Servers in the World! ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==----- Received on Mon Oct 25 1999 - 09:46:38 CDT

Original text of this message

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