Re: Looking into all the tables of a schema

From: news.verizon.net <kennedyii_at_verizon.net>
Date: Wed, 16 Jan 2008 10:44:43 GMT
Message-ID: <veljj.11538$W73.1615@trnddc04>

"Ratan" <ratan.nitrkl_at_gmail.com> wrote in message news:d75c8bf5-a9ca-4ee5-9d6b-5e3955b1fc7f_at_s8g2000prg.googlegroups.com...
> Hi everybody,
>
> Is there any method using which I can search some numbers in all
> numeric fields in all the tables of a particular schema ????
>
> This is urgent. Thnaks in advance.

Use sql to generate sql and run the result.

eg something like:
spool tmp.sql

 select 'select * from '||owner||'.'||table_name||' where '||column_name||'=myvalue;' from dba_tab_columns dtc where dtc.owner='THESCHEMA' and dtc.column_type='NUMBER' order by table_name, column_name;

spool off
@tmp.sql

You have to debug the above a little bit, but it gives you the idea. Jim Received on Wed Jan 16 2008 - 04:44:43 CST

Original text of this message