I have data in a access2007 file and having problems with pulling data when I trying to find records within a particular date.
The following works just fine
SELECT expenseType
FROM expenseTypes
WHERE
expenseTypeID = 7 AND
expenseSource = 3
but if I try to do
SELECT
SUM (expenseAmt) AS thisAmt
FROM expenses3
WHERE
expenseDate < #1/1/2006#
I don't get anything. No error. Nothing.
If I do
SELECT
SUM (expenseAmt) AS thisAmt
FROM expenses3
WHERE
expenseDate > #1/1/2006#
I get the same result as if I wrote
SELECT
SUM (expenseAmt) AS thisAmt
FROM expenses3
WHERE
expenseDate > #1/1/2007#
The only thing I could think of is that there is something wrong with the date.
It's date/time with a format of short date. I added a few rows and typed in some data thinking that this new data would have to be good. But that didn't help.
I must be missing something simple because I've wasted too much time over something so simple.
The following works just fine
SELECT expenseType
FROM expenseTypes
WHERE
expenseTypeID = 7 AND
expenseSource = 3
but if I try to do
SELECT
SUM (expenseAmt) AS thisAmt
FROM expenses3
WHERE
expenseDate < #1/1/2006#
I don't get anything. No error. Nothing.
If I do
SELECT
SUM (expenseAmt) AS thisAmt
FROM expenses3
WHERE
expenseDate > #1/1/2006#
I get the same result as if I wrote
SELECT
SUM (expenseAmt) AS thisAmt
FROM expenses3
WHERE
expenseDate > #1/1/2007#
The only thing I could think of is that there is something wrong with the date.
It's date/time with a format of short date. I added a few rows and typed in some data thinking that this new data would have to be good. But that didn't help.
I must be missing something simple because I've wasted too much time over something so simple.
Comment