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

Search All Tables in DB for GUID

I found one SP that will search for strings but not GUIDs. Does anybody have a SP or query that can do this?

Thanks.
0
LCNW
Asked:
LCNW
  • 4
2 Solutions
 
p_nutsCommented:
What do you mean with guid
0
 
LCNWAuthor Commented:
unique identifier, such as ee549e9c-60d1-4b7f-a6f1-b88c45960248
0
 
LCNWAuthor Commented:
I found this but am unsure how to run it. I created the SP but not sure what to do next.

http://stackoverflow.com/questions/970477/sql-server-search-all-tables-for-a-particular-guid
0
 
LCNWAuthor Commented:
I figured out to tweak this code:

http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm

to include 'uniqueidentifier'

So from
AND      DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar')
to
AND      DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar','uniqueidentifier')

This works great.
0
 
LCNWAuthor Commented:
I found this on my own.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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