Re: Using value of variable in PL/SQL
From: Thierry A. Lach <tlach_at_PROBLEM_WITH_INEWS_GATEWAY_FILE>
Date: 20 Jul 1994 19:30:26 GMT
Message-ID: <30ju0i$qps_at_eccdb1.pms.ford.com>
Date: 20 Jul 1994 19:30:26 GMT
Message-ID: <30ju0i$qps_at_eccdb1.pms.ford.com>
In article <30e3t0$qje_at_m.ehd.hwc.ca>, lon_at_hpb.hwc.ca (LONG ON) writes:
> Is it possible to have pointer variable in PL/SQL?
>
> For example:
>
> Declare
> avar1 char(30) := 'a_table_name';
> Begin
> select * from ^avar1; /* ^avar1 => replace avar1 with 'a_table_name' */
> End;
>
> What are the alternatives to accomplish this?
>
> Thanks for any pointers.
>
> Long
> Ottawa
>
If you are working with sql*plus you can...
define avar1 = 'a_table_name'
begin
select * from &&avar1;
end;
Note this only works with sql*plus, not with pl/sql as part of forms...
And look into the NEW_VALUE option of the column statement as an alternative to the define...
-- =========================================================================== Thierry Lach | Sufficiently superior technology | Work: thierry_at_eccdb1.pms.ford.com | is indistinguishable from magic. | Home: curlie!thierry_at_sycom.mi.org |==================================| #include <std.disclaimer> | We Do Magic Here! | ===========================================================================Received on Wed Jul 20 1994 - 21:30:26 CEST