×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

search all tables

search all tables

search all tables

(OP)
Okay, I'm writing a crystal report, don't have a data structure.  Not an SQL guru, but need one.  What I'd like to do is search the entire database, all tables, for a word string in an effort to find a field in a specific table that is harboring the data I'm after.

Like search all tables in sqldb for field with 'opening balance'

Or something like that.  Is it possible?

It's late I'm tired thanks much in advance.

RE: search all tables

Search all data stored, or just column names?  Just column names isn't too bad, but thats probably something you want to figure out before you write your report. In oracle, you can select * from user_tab_columns where column_name = 'opening_balance'.  There is probably a similar table for other enterprise level databases.  Searching all data in a database is a very bad idea.   

RE: search all tables

I'm afraid it's not possible to do this

Quote:

"search the entire database, all tables, for a word string in an effort to find a field in a specific table that is harboring the data I'm after."
in SQL.

Each table needs to be queried seperately for the data you're looking for. To automate it, you would need a procedural extension like PL/SQL or T-SQL to loop through each column in each table looking for the string you're after. Or you could write some actual code (VB,C#, Java, etc) to do it for you.


 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close