SQL - Finding a string

Posted on 2009-12-16
Last Modified: 2012-05-08
Hello Experts,
How can I find a bad character in a database column?
Question by:innocent1973
    LVL 26

    Expert Comment

    what do you mean by bad character?

    Author Comment

    I have a database table named "description". I have imported some data from an external data source. But some bad characters also imported to this data table column. I am trying to find these records.
    for example the following character is a bad character in my description column:
    LVL 26

    Accepted Solution

    this will find

    SELECT *
    FROM description
    WHERE description LIKE '%Å%'

    Open in new window

    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    SELECT *
    FROM description
    WHERE description LIKE '%[^0-9a-zA-Z]%'

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
    Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
    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…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    729 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

    22 Experts available now in Live!

    Get 1:1 Help Now