When access performs a query, an error "Data Type mismatch in the standard expression" is thrown.

Source: Internet
Author: User

During project development, the access query operation is involved,

However, MSSQL T-SQL write more, access will also be forgotten.

In one query, it is related to the time field and is habitually written:

 

Select count (*) from [user] Where [createtime]> '2017-2-10'

 

Of course, access also habitually reports an error: "The data type in the standard expression does not match". At first, I thought my time value format was wrong. However, no errors are found after debugging,

So I began to suspect that the access SQL was correct only when I checked the access help and wrote the following sentence:

 

Select count (*) from [user] Where [createtime] >#{ 0 }#

 

This is a silly mistake to spur your carelessness!

 

 

 

 

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.