Re: variables in sql-statements

From: John Dorlon <john_at_ezsql.net>
Date: 13 Jun 2001 07:28:48 -0700
Message-ID: <a8097a33.0106130628.2cce5357_at_posting.google.com>


Try this :
(it will only work in 8i)  

 declare
 tab_name varchar2(20);
 col_name varchar2(20);  

 begin
 tab_name:='labor';
 col_name:='name';  

 execute immediate('select * from ' || tab_name ||

                   ' where ' || col_name || ' =''ROM34''');
 

 end; Received on Wed Jun 13 2001 - 16:28:48 CEST

Original text of this message