SQL WHERE question

Posted on 2011-04-25
Last Modified: 2012-06-27
I need to find the records which contain some specicial characters such as a trademark. In Visual Basic (maybe unicode?) the trademark is represented by AscW(174).
How would I structure my WHERE clause to return the records that contain the trademark?

Select Field1 From TableA where Field1 Like ???????????  or Contains?

Question by:mpdillon
    LVL 25

    Accepted Solution

    Have you tried:

    WHERE Field1 Like '%' + CHAR(174) + '%'
    LVL 9

    Expert Comment

    You can use the character in sidle the like operater and do something like this
    SELECT Field1 FROM TableA WHERE Field1 LIKE '%' + char(174) + '%'

    Open in new window


    Author Closing Comment

    Thank you both,
    I was using Chr and not Char. It now works.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
    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 …
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    731 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

    17 Experts available now in Live!

    Get 1:1 Help Now