如何在MS Access中指定日期范围?以下查询是否正确?我必须"2/1/2010"
加注?或者我必须做些什么date(2/1/2010)
?
SELECT [Occurrence Number] as Fld
FROM [Lab Occurrence Form]
WHERE [Practice Code]="ACCIM"
AND [1 0 Preanalytical (Before Testing)]="1.1 Specimen Mislabeled"
AND ([Occurrence Date] Between 2/1/2010 and 2/28/2010);
Run Code Online (Sandbox Code Playgroud)
以下给我一个类型不匹配
SELECT [Occurrence Number] as Fld FROM [Lab Occurrence Form] WHERE [1 0 Preanalytical (Before Testing)]="1.1 Specimen Mislabeled" AND [Occurrence Date] between "1/1/2009" and "2/2/2010";
Run Code Online (Sandbox Code Playgroud)
Ale*_*x W 19
ms-access使用Jet引擎,它使用#作为日期文字:
SELECT Orders.*
FROM Orders
WHERE Orders.OrderDate Between #3/1/96# And #6/30/96#;
Run Code Online (Sandbox Code Playgroud)