1
我需要在具有特殊字符的文本字段(名爲Description)中搜索:ñ,á,ó...如何在SQL Server中搜索文本忽略特殊字符?
例如:Description =「Lacancióntiene buen ritmo !!!」
我可以搜索'cancion'或'canción',並且需要返回此行。
所以,我所做的:
- 是替換此特殊字符的功能。
一個選擇使用它在表中搜索:
SELECT IdItem, Description FROM tblItemsTable WHERE dbo.fnReplaceSpecialChars (Description) LIKE '% word%' OR dbo.fnReplaceSpecialChars (Description) LIKE 'word%'
我的問題是這樣的搜索是很慢的......
它可以在一個更好的/優化的方式來完成?
謝謝!