我在Access数据库中的查询问题 [英] Problem in my Query in Access Database
本文介绍了我在Access数据库中的查询问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿,任何人都知道,
我的查询很简单,只是一个简单的"SELECT QUERY",但是我遇到了一个以前从未遇到过的问题.每当我在select语句中输入一个条件(where子句)时,它肯定会弹出一条错误消息,提示:条件表达式中的数据类型不匹配."
任何想法都将不胜感激...谢谢.
Hey, anybody know this,
My query is simple just a simple "SELECT QUERY", but i encounter a problem that i had never encounter before. Every time i put a condition(Where Clause) in my select statement it will definitely pop an error message says that : "Data type mismatch in criteria expression."
Any idea will be appreciated...Thanks.
推荐答案
这意味着您的查询-您没有告诉我们-试图比较两个项目两者无关:例如,如果您要比较的数据库字段是DateTime,而您要比较的值是Bool.
一个示例是(假设您在名为"myTable"的表中有一个名为"id"的整数列:
What that implies is that your query - that you don''t tell us - is trying to compare two items which are not related: for example if the database field you are comparing is DateTime and the value you are trying to compare against is Bool.
A sample would be (assuming you have an integer column called "id" in a table called "myTable":
SELECT * FROM myTable WHERE id=17
这篇关于我在Access数据库中的查询问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文