This article is a mirror article of machine translation, please click here to jump to the original article.

View: 3613|Reply: 2

[Source] LIKE fuzzy queries in SQL Server do not work properly in Chinese

[Copy link]
Posted on 3/18/2023 10:05:49 PM | | | |
Requirements: In a SQL Server database, use a LIKE fuzzy query to search for no records, then copy the data into Notepad, and find that the keyword does exist in that record, however, the results really can't be found by LIKE '%keyword%'.

It is possible to find English letters fuzzily through LIKE, but fuzzy query in Chinese does not work properly.

The solution is as follows:


like is added after itN, N converts the string tonchar,nvarcharType.



The test code is as follows:





Previous:Synchronous operations are disallowed. Call WriteAsync or set AllowSync...
Next:ChatGPT resource sharing
Posted on 3/18/2023 10:29:48 PM |
Learn it
Posted on 3/23/2023 9:07:38 AM |
Learning and learning
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com