Solved

search all nvarchar columns

Posted on 2012-03-30
2
272 Views
Last Modified: 2012-06-21
How can I search all nvarchar columns in a database for a specific text sting?
0
Comment
Question by:HLRosenberger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Accepted Solution

by:
jogos earned 500 total points
ID: 37788521
Nvarchars only? Don't forget that there could be some loose columns with type varchar, text, ntext?????

If it's one time dynamic sql.  Look for all columns (information_schema.Columns) with your datatype and construct your select with it.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 37788538
got it.
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
TSQL Challenge... 7 53
SQL Select Query help 1 47
SQL SERVER 2008 R2 Problem copying database 10 66
Complex SQL Server WHERE CLause 9 37
     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question