Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> PL/SQL question

PL/SQL question

From: Thierry <thierry.constant2_at_wanadoo.fr>
Date: Mon, 17 Dec 2001 21:47:43 +0100
Message-ID: <3c1e5954$0$3191$626a54ce@news.free.fr>


Hi,

I try to find a string TOTO in any table belonging to a user JOHN I write the following in PL/SQL:



declare
cursor c1 is

        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;
/


Received on Mon Dec 17 2001 - 14:47:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US