• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

search for field name

Can anyone provided SQl that will search a database for all occurrances of a string within all column names?  Like, I want all column name that have the work "title" in them.  
0
HLRosenberger
Asked:
HLRosenberger
  • 3
  • 3
1 Solution
 
Gerwin Jansen, EE MVETopic Advisor Commented:
What database do you want this query for? For instance, SQL Developer for Oracle has a standard report that you can use to locate your tables, columns etc. based on such a filter.
0
 
HLRosenbergerAuthor Commented:
Sorry.  MS SQL Server
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
I'm more into Oracle, but you can try this:

SELECT COLUMN_NAME, TABLE_NAME 
FROM INFORMATION_SCHEMA.COLUMNS 
WHERE COLUMN_NAME LIKE '%MyTitle%'

Open in new window


where MyTitle is the string you're looking for. You may have to try upper/lower case (combinations).
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
HLRosenbergerAuthor Commented:
I've requested that this question be deleted for the following reason:

no correct answer was provided for MS SQL.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
Did you try the suggestion I gave you?

I know more about Oracle but the answer I gave is for MS SQL.
0
 
HLRosenbergerAuthor Commented:
Thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now