标准表达式中的数据类型不匹配

发布于 2024-08-31 13:22:25 字数 186 浏览 3 评论 0原文

我收到此错误:尝试在访问中执行此查询时,条件表达式中的数据类型不匹配:

从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼眸印温柔 2024-09-07 13:22:25

要进行访问,您需要在日期之间使用 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 ##.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文