Le Kevin dot com

photographic-poetic-musical horizon

Browsing Posts tagged Database

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:

This download will install a set of components that can be used to facilitate transfer of data between 2010 Microsoft Office System files and non-Microsoft Office applications.

To shrink the file size I use the following script: Use DBName Go exec sp_dboption DBName, ‘trunc. log on chkpt.’, true checkpoint DBCC SHRINKFILE (N’DBNameFileName, 0); exec sp_dboption DBName, ‘trunc. log on chkpt.’, false