Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> PL/SQL question
Hi,
I try to find a string TOTO in any table belonging to a user JOHN I write the following in PL/SQL:
select table_name,column_name from dba_tab_columns where
owner='JOHN' and data_type like '%CHAR%';
nom_table varchar2(30) ;
nom_col varchar2(30) ;
begin
open c1;
loop
fetch c1 into nom_table,nom_col; exit when c1%notfound; select * from nom_table where nom_col like '%TOTO%';
>>>there is something wrong using the variables nom_table and nom_col
>>>but I don't know what , any help ????
end loop;
close c1;
end;
/