Access Fuzzy Query considerations

Source: Internet
Author: User

The problem that the Access fuzzy query appears, need attention in development!
In SQL Server, a fuzzy query is typically such a select * from articletable where authorname like '%jacky% '
But in Access using this statement to execute the time unexpectedly found no results, how is it possible?

Later, we looked up the following information and found the following problems:
To make a fuzzy lookup, you must use wildcards, and the access library has a different wildcard character than SQL Server.


The wildcard characters for the Access library are:
* matches any number of characters.
? Match with any single letter of character
The wildcard characters in SQL Server are:
% matches any number of characters
-Matches a single character

The correct wording should be:

Written in C # should be written as Select * from Table where Name like '%jacky% '

Select * from Table Where Name like ' _jacky_ '

The test statement in Access should be written as: Select * from Table Where Name like ' *jacky* '

Select * from Table Where Name is like '? Jacky? '

Access Fuzzy query considerations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.