If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > remove and replace accents function

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-02-05, 14:29
xarfox xarfox is offline
Registered User
 
Join Date: Jun 2004
Location: Philly
Posts: 51
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
Reply With Quote
  #2 (permalink)  
Old 11-02-05, 15:31
Brett Kaiser Brett Kaiser is offline
Window Washer
 
Join Date: Nov 2002
Location: Jersey
Posts: 10,303
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.
Reply With Quote
  #3 (permalink)  
Old 11-03-05, 13:55
hmscott hmscott is offline
Registered User
 
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?
Reply With Quote
  #4 (permalink)  
Old 11-03-05, 14:25
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
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
Reply With Quote
  #5 (permalink)  
Old 11-03-05, 14:34
Brett Kaiser Brett Kaiser is offline
Window Washer
 
Join Date: Nov 2002
Location: Jersey
Posts: 10,303
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.
Reply With Quote
  #6 (permalink)  
Old 02-24-11, 11:56
sacha79 sacha79 is offline
Registered User
 
Join Date: Feb 2011
Posts: 2
replace accent

To replace accent with a CLR, SQL Server...
XooWiki
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On