Cleanse This - windows-1252 and utf8

  • Has anyone got any idea how to cleanse this using t-sql?

    With cte_a

    As

    (Select 'Japan’s' As name

    Union

    Select 'Café Main’s' As name

    Union

    Select 'Company’' As name

    Union

    Select 'décor' As name

    Union

    Select '‘Attention’, Coast’s' As name

    Union

    Select 'Sportâ€TMs' As name

    Union

    Select 'time… 1990' As name

    Union

    Select 'kidsâ€TM clothes' As name

    Union

    Select 'â€oeThereâ€TMs' As name

    Union

    Select N',” kidsâ€TM' As name

    )

    Select *

    From cte_a

  • Have a look at this code, DigitsOnlyEE and AlphaNumericOnly By Alan Burstein[/url]

    😎

  • The "gibberish" in the data looks more like possible punctuation or special character marking. It looks like it may a "simple" code page problem.

    --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)

  • p.s. SQL Server can't actually handle UTF-8 until you get to 2016.

    --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)

  • I am already using SQL 2016 Standard. Still familiarizing with the features. And the data I received was from various web scrapes through a 3rd party vendor which is why it appears to be so dirty

Viewing 5 posts - 1 through 4 (of 4 total)

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