Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2004
    Location
    Philly
    Posts
    51

    Unanswered: remove and replace accents function

    does anyone know where i can find a user defined function that replaces accented characters with their normal ones

    i want to replace all accented characters since for some reason sql server does not store the characters properly, or when they exported to excel for html they are displayed incorrectly

    thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Come again?

    Got an example?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by xarfox
    does anyone know where i can find a user defined function that replaces accented characters with their normal ones

    thanks

    REPLACE?

    FROM SQL BOL:
    REPLACE (string1, string2, string3)

    SELECT REPLACE('abcdefghicde','cde','xxx')
    GO

    (no column name)
    abxxxfghixxx
    Have you hugged your backup today?

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Can you just force an Accent-Insensitive collation for the comparison? This is lots faster, easier, and more reliable than trying to "skin the string" yourself.

    Brett: What they want is to convert any of (, , , , , ) into A. There are lots of letters, and some strange conversion rules. A collation change is easy, standard, and reliable.

    -PatP

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Why Do people use other than out of the box collation?

    I mean, I know there are certain situations....but I haven't seen one where it's been needed.

    I love when they set up case sensitive....

    Thanks for coming up for some air.....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  6. #6
    Join Date
    Feb 2011
    Posts
    2

    replace accent

    To replace accent with a CLR, SQL Server...
    XooWiki

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •