Find special characters

  • Got it. I'm going straight to the point.

    I need to find my registration in all products that have the following characters in the description:

    ¢ ç ° Ç O ^ ã Â ~ ´

    Sorry for not being clearer ...

    Thank you all for your attention

  • For a fixed list then use patindex like this

    SELECT Description, substring(IsNull(Description,''),PATINDEX('%[¢ç°ÇãÂ~´/^]%',IsNull(Description,'')),1)

    FROM TBProduct

    WHERE PATINDEX('%[¢ç°ÇãÂ~´/^]%',IsNull(Description,'')) > 0

    Note I did remove the O as it came thru as letter oh not what it was meant to. Also, you will notice a / in front of ^ since ^ means not in the pattern you have to use an escape for it to work.

  • Perfect ....

    Exactly what I needed.

    Sorry for the work.

    Thanks to all members who are interested and SSCrazy Eights for help.

    Thanks

    SOLVED

  • Why use the CHAR function to convert it back to a character?

    Why not just check for the ASCII value?

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • peter90west (3/28/2012)


    novated lease

    SPAM Reported.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply