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: searching entire database

Re: searching entire database

From: joel garry <joel-garry_at_home.com>
Date: 13 Feb 2007 13:04:37 -0800
Message-ID: <1171400677.402382.62940@a75g2000cwd.googlegroups.com>


On Feb 10, 12:40 am, seannakas..._at_yahoo.com wrote:
> How do I search the entire database for a value and return the
> tablenames and column names that contain this value? For argument
> sake, let's say I'm searching for the text "the quick brown fox".
>
> I think someone posted this question before but it never got any
> responses--since it's been awhile, i thought i might post it again.
>
> In case your wondering why I want to do this, I'm using a software
> package that stores all it's data in a database. It shows me the
> data, but I have no idea what tables and column names contain these
> values so it's hard to change the data through sql scripting.
>
> thanks a lot,
> Sean.

Another variant on Ana's answer is to export the schema and run grep - b
for the string. The run grep -b for "CREATE TABLE" and you may have enough information to figure out the table and column names.

Niall's and Rene's code are quite impressive, though, not to mention already written.

jg

--
@home.com is bogus.
http://www.signonsandiego.com/uniontrib/20070213/news_1b13ams.html
Received on Tue Feb 13 2007 - 15:04:37 CST

Original text of this message

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