Re: Ways to Generate References to Specific Character String in a Schema

From: John Hurley <johnbhurley_at_sbcglobal.net>
Date: Mon, 22 Feb 2010 14:06:23 -0800 (PST)
Message-ID: <e8915916-8ff1-46a4-afb3-df4e01474426_at_f8g2000yqn.googlegroups.com>



On Feb 22, 4:38 pm, "if_inves..._at_yahoo.com" <basis_consult..._at_hotmail.com> wrote:

snip

> Hi,
>
> In a 10g database, I am looking for all ways to list references
> to a specific data string in any table of a specific schema, assuming
> that the fields are all VARCHAR2.
>
> For example, suppose that there is a schema named OLYMPICS.
>
> That schema has many tables, and I am looking for all tables that
> have a data value of 'Vancouver' (Hopefully, case insensitive), in
> any field. The fields are all VARCHAR2.
>
> So, the script will, hopefully, generate the following data. The most
> important
> info. is the tablename... I can live without the fieldname and value.
> I would
> prefer the case insensitivity, but I can live without that also.
>
> Schema       Table      Field                Data Value
>
> OLYMPICS- HOST     Currenthost      vancouver
> OLYMPICS- CITIES    2010host         Vancouver
>
> etc..
>
> Thanks,
> QZ

A bunch of dynamic SQL in a PLSQL procedure could get this done for you ...

It kinda/sorta sounds an awful lot like a homework assignment for some class to me.

Maybe a CURSOR loop thru USER_TABLES might be a starting point ... Received on Mon Feb 22 2010 - 16:06:23 CST

Original text of this message