O
order800
This is the complete DB.
Table1
ID Date
1 1/1/2000
2 2/1/2000
3 3/1/2000
4 4/1/2000
5 5/1/2000
6 6/1/2000
7 7/1/2000
8 8/1/2000
9 9/1/2000
10 10/1/2000
11 11/1/2000
12 12/1/2000
When I input 1 and 6 on the following query it returns outside of range….
SELECT Table1.ID, Table1.Date, DatePart("m",[Date]) AS Expr1
FROM Table1
WHERE (((DatePart("m",[Date])) Between [Start] And [End]));
Query1
ID Date Expr1
1 1/1/2000 1
2 2/1/2000 2
3 3/1/2000 3
4 4/1/2000 4
5 5/1/2000 5
6 6/1/2000 6
10 10/1/2000 10
11 11/1/2000 11
12 12/1/2000 12
But without input it works:
SELECT Table1.ID, Table1.Date, DatePart("m",[Date]) AS Expr1
FROM Table1
WHERE (((DatePart("m",[Date])) Between 1 And 6));
Query1
ID Date Expr1
1 1/1/2000 1
2 2/1/2000 2
3 3/1/2000 3
4 4/1/2000 4
5 5/1/2000 5
6 6/1/2000 6
Why will it not accept input?
Table1
ID Date
1 1/1/2000
2 2/1/2000
3 3/1/2000
4 4/1/2000
5 5/1/2000
6 6/1/2000
7 7/1/2000
8 8/1/2000
9 9/1/2000
10 10/1/2000
11 11/1/2000
12 12/1/2000
When I input 1 and 6 on the following query it returns outside of range….
SELECT Table1.ID, Table1.Date, DatePart("m",[Date]) AS Expr1
FROM Table1
WHERE (((DatePart("m",[Date])) Between [Start] And [End]));
Query1
ID Date Expr1
1 1/1/2000 1
2 2/1/2000 2
3 3/1/2000 3
4 4/1/2000 4
5 5/1/2000 5
6 6/1/2000 6
10 10/1/2000 10
11 11/1/2000 11
12 12/1/2000 12
But without input it works:
SELECT Table1.ID, Table1.Date, DatePart("m",[Date]) AS Expr1
FROM Table1
WHERE (((DatePart("m",[Date])) Between 1 And 6));
Query1
ID Date Expr1
1 1/1/2000 1
2 2/1/2000 2
3 3/1/2000 3
4 4/1/2000 4
5 5/1/2000 5
6 6/1/2000 6
Why will it not accept input?