标准表达式中的数据类型不匹配
我收到此错误:尝试在访问中执行此查询时,条件表达式中的数据类型不匹配:
从 Totals_table 中选择 sum(total_sum),其中 tot_date >= '3/01/2010' 且 tot_date < '4/01/2010'
PS tot_date 是日期/时间类型,tot_sum 是数字类型
I'm getting this error: Data type mismatch in criteria expression when trying to execute this query in access:
select sum(total_sum) from totals_table where tot_date >= '3/01/2010' and tot_date < '4/01/2010'
P.S. tot_date is of type Date/Time and tot_sum is of type Number
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要进行访问,您需要在日期之间使用 BETWEEN:
WHERE Date BETWEEN #2009/12/30# AND #2010/12/30#
还要在 ## 之间写下您的日期。
For access, you need BETWEEN for the dates:
WHERE Date BETWEEN #2009/12/30# AND #2010/12/30#
Also write your dates between ##.