Escape character for access

Source: Internet
Author: User

Database escape character rules in Access:

Insert, UPDATE, = match data, text type such as "enclosed, can have", *,%,[,],/,/,?, (,), {,} any combination, such as to insert a ', need to write ' and in the entire expression jacket a pair of '
For example, insert ' Zhang ' three ', the database is a ' three, with square brackets is not possible

Insert, UPDATE, = match data, text type such as "" in the middle can have ', *,%,[,],/,/,?, (,), {,} any combination, such as to insert a ', need to write ' and in the entire expression jacket pair ""
For example, insert "Zhang" "three", the database is Zhang "three

For fuzzy matching, the text type is enclosed in ', middle can have ', *,],/,/, (,), {,} any combination, pair [,%,?, need to follow the set of pairs in each special symbol around [],
To match [?, should write like '%[[][?] % ', can't write like '%[[?] % ', which will match records containing [or?, and [? will not necessarily match to close together.

Summarize:

When inserting, updating, or matching data, unify the text type with ' ', simply convert ' to ' in the expression to be inserted
In the case of fuzzy matching, the text type is uniformly ' enclosed ', will ' turn ', and for each [,%,?, are enclosed in parentheses.

Example:

Insert into Test (Name) VALUES ("//*%%_[[" with ' double ' citation ")
Insert record with ' double ' ' citation//*%%_[['.

Insert into Test (Name) VALUES (' Surround ' with ', ' ' single ' ') [({/*%}]
Insert record is enclosed in "" "single-apostrophe [({/*%}] number.

SELECT * from Test where Name like ' *[%][%]? [[]*‘

Search contains percent [The string?] Represents a character, * matches any character, in the program to write%

SELECT * from Test where Name like ' * double ' ' * '

Find a string containing double ' '


Reference URL
Http://www.jb51.net/article/9280.htm
Http://topic.csdn.net/t/20051018/10/4333207.html
Http://access911.net/index.asp?u1=a&u2=71FAB01E10DCEFF3
Http://topic.csdn.net/u/20090828/15/e8e21e28-0ed0-47f2-b916-cac41d9589db.html
Http://zhidao.baidu.com/question/18060589.html

Escape character for access

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.