Like date type query distinguishes between access and SQL Server _ database other
Source: Internet
Author: User
The most recent problems with Access databases are summarized:
The use of like in Access
Like wildcard usage in Access is this:
“?” Represents any single character; "*" means 0 or more characters; "#" means any number
So it should be:
SELECT * from DatabaseName where fieldname like ' *xx* '
But in SQL SERVER, 0 or more characters are represented in%
Ii. How to query the date range data for a DateTime type field in Access
If the field is a time/date type, you are performing something like this
SELECT * FROM [card] where [datetime] <= ' 2006-09-20 ' and [datetime]>= ' 2006-09-01 '
An error occurs in Access, and you should precede the date field with "#" that is:
SELECT * FROM [card] where [datetime] <= #2006 -09-20# and [datetime]>= #2006 -09-01#
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