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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Search for a string a database

Re: Search for a string a database

From: Martin Doherty <martin.doherty_at_elcaro.moc>
Date: Wed, 27 Nov 2002 11:26:05 -0800
Message-ID: <C39F9.8$tk.91@news.oracle.com>


You could also add in the column_name and table_name as strings so your search will not only return the matching strings but where they came from e.g.
select column_name, 'column_name', 'table_name' as grep_value from table_name
union

Martin Doherty

Galen Boyer wrote:

>On 27 Nov 2002, cguyard_at_free.fr wrote:
>
>
>>I need to search for a string in a oracle database but i don't
>>know in which table this string is. I don't want to look all
>>tables... Is there someone that can help me....?
>>
>>
>
>Query the system tables for all string like datatypes, retrieving
>their table and column names. Slap the strings
>
> select column_name as grep_value
> from table_name
> union
>
>around them. Then, slap "create view oragrep as" on top of
>that. Replace the final union with ";". Now, execute that SQL.
>
>Then, execute the query,
>
>select * from oragrep where grep_value = 'string';
>
>
>
Received on Wed Nov 27 2002 - 13:26:05 CST

Original text of this message

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