Jump to content
  • Advertisement
Sign in to follow this  
djsteffey

oracle question

This topic is 3320 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

how can i search an entire oracle database for a particular string or pattern? i dont know what table or what column the string will be in.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by ncsu121978
how can i search an entire oracle database for a particular string or pattern? i dont know what table or what column the string will be in.


Then you either need to figure that out, or have a problem with your db schema.

Share this post


Link to post
Share on other sites
maybe you misunderstood.....

i want to know the table_name and column_name that contains the given string or pattern. this could be multiple places in the database that will contain this string and i want to know all the locations.

Share this post


Link to post
Share on other sites
You can find the existing tables/columns in all_tab_columns.
http://en.wikipedia.org/wiki/Oracle_metadata#Example_2:_finding_columns
Then, for each of the column which is of the interesting type, you select everything that looks like your string.

I hope for you that this is a one-time need, and that your base is small :)
Good luck !

Share this post


Link to post
Share on other sites
Quote:
Original post by ncsu121978
maybe you misunderstood.....

i want to know the table_name and column_name that contains the given string or pattern. this could be multiple places in the database that will contain this string and i want to know all the locations.


So, let me get this straight.

You have a number of tables, table1..tablen

Each has a number of columns, column1..columnn

You want to find a string. It will exist as a row in a table, in a column. But you don't know which table and column.

Is this accurate?

Share this post


Link to post
Share on other sites
kyoryu...that is correct.
the database is not my own and i don't nkow where everything in it is stored. So i am looking for a known specific string that is in the database but am unsure of its location. I want to know its location.

Share this post


Link to post
Share on other sites
What you want is full-text indexing, I believe. Kind of like how google works or Windows Desktop Search or something like that. If you're using Java there's Lucene, or if you're using .NET, theres, um, Lucene.NET. I don't believe Oracle has full-text indexing built in, but maybe they do (SQL Server does, for example)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!