Search All Tables in DB for GUID

Posted on 2012-08-27
Last Modified: 2012-09-09
I found one SP that will search for strings but not GUIDs. Does anybody have a SP or query that can do this?

Question by:LCNW
    LVL 13

    Expert Comment

    What do you mean with guid
    LVL 1

    Author Comment

    unique identifier, such as ee549e9c-60d1-4b7f-a6f1-b88c45960248
    LVL 1

    Accepted Solution

    I found this but am unsure how to run it. I created the SP but not sure what to do next.
    LVL 1

    Assisted Solution

    I figured out to tweak this code:

    to include 'uniqueidentifier'

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

    This works great.
    LVL 1

    Author Closing Comment

    I found this on my own.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
    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 …
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now