Le Kevin dot com

photographic-poetic-musical horizon

Browsing Posts tagged clr

Sometimes we want to remove accents from vietnamese words to Latin based characters for search or matching routine in database. However, Microsoft SQL Database does not offer normalized function which we can use to remove accents from words such as:

AI ĐI TRÊN DÀM ĐƯỜNG TRƯỜNG => AI DI TREN DAM DUONG TRUONG
ÁO EM CHƯA MÀC MỘT LẦN => AO EM CHUA MAC MOT LAN

Good thing, there is a workaround by using CLR function, please example code below:

If you are working with SQL server CLR objects there’s a higher possibility that you might encounter the following error. “Msg 6263, Level 16, State 1, Line 1 Execution of user code in the .NET Framework is disabled. Enable “clr enabled” configuration option” To overcome this, you have to reconfigure the SQL server to enable [...]