我将日期存储在"常规日期"格式的MS-Access表中.
我正在尝试创建一个返回特定日期范围(2010年3月以来的所有记录)之间的记录的查询,但是我遇到了"critera expression"中的"数据类型不匹配"消息.
这是我的发言;
SELECT Loan.loan_datetimeLeant, product_name,
[product_artist/director], product_category, loanItem_cost
FROM Loan
INNER JOIN ((Product
INNER JOIN Ite
ON Product.[product_id] = Item.[product_id])
INNER JOIN Loan_Items
ON Item.[item_id] = Loan_Items.[item_id])
ON (Loan.[cust_id] = Loan_Items.[cust_id])
AND (Loan.[loan_datetimeLeant] = Loan_Items.[loan_datetimeLeant])
WHERE Loan.loan_datetimeLeant >= '01/03/2010'
AND Loan.loan_datetimeLeant <= '31/03/2010'
ORDER BY Loan.loan_datetimeLeant;
Run Code Online (Sandbox Code Playgroud)
我尝试过日期格式的变化(mm/dd/yyyy,dd/mm/yyyy 00:00:00)
Les*_*lie 11
访问日期的分隔符是#:
WHERE Loan.loan_datetimeLeant >= #03/01/2010# AND Loan.loan_datetimeLeant <= #03/31/2010#
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5495 次 |
| 最近记录: |