Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Tablename variable. How To?
On Thu, 22 Jul 1999 10:16:29 +0200, Helmut Hahn
<helmut.hahn_at_bitoek.uni-bayreuth.de> wrote:
>You could build a function gettablename returning this char and then try
>select * from (select gettablename() from dual);
>or direct
>select * from (select tt from dual); (Don't know if this works!)
>
I asked a similar question in another thread (Q: table name as parameter to PL/SQL procedure), but didn't get any response. Apparently, what I wanted is not possible, but if I understand what you are saying, I can come close.
However, I was not able to make your suggestions work. I suspect it is because I am not familiar enough with PL/SQL and Oracle, and I am not understanding something crucial.
This is what I tried:
SQL> create or replace function test_gettable
2 return varchar2
3 is
4 begin
5 return 'sec_tree';
6 end;
7 /
Function created.
SQL> select * from (select test_gettable() from dual); select * from (select test_gettable() from dual)
*
SQL>
Please enlighten me.
hlh_NOSPAM_at_excite.com is a valid, unmunged address!
It is also so full of spam(!) that I don't read it.
Received on Thu Jul 22 1999 - 08:57:53 CDT
![]() |
![]() |