Re: PL/SQL - Variables in select statement

From: Peter Brenner <pbrenner_at_charlotte.infi.net>
Date: Thu, 31 Dec 1998 10:39:37 -0500
Message-ID: <76g5ai$p61$1_at_nw001t.infi.net>


take a look at the PL/SQL built-in called DBMS_SQL. It provides methods for creating and executing dynamic SQL statements from PL/SQL

HTH
Peter

Phack wrote in message <7566pr$fgo$1_at_news.cybercity.dk>...
>I want to make the same select from several tables, and for that I want to
>create a stored procedure that I call with at parameter consisting of the
>table name. But I reach a dead-end of my knowledge and ability to find
>information about how the select statement can use the variable. I am
trying
>to do the following
>
>create or replase search_tabel (tabel_name IN varchar2) is
>
> cursor c_table is
> Select * from tabel_name
> where ...;
>
>Begin
> ...
>
>Apparrently this use of the parameter (tabel_name) is not valid. Could you
>help me with how I should do this, and if it is possible at all?
>
>Thank's in advance,
>
>Paw
>
>
Received on Thu Dec 31 1998 - 16:39:37 CET

Original text of this message