Unexpected results in a query....

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I have a query:

SELECT Transactions.TransactionDate,
Transactions.TransactionAmount
FROM Transactions
WHERE (((Transactions.TransactionDate) Between [Forms]!
[frmFilter]![FirstDate] And ([Forms]![frmFilter]!
[LastDate]-1)));

So, if frmFilter.FirstDate = "01.04.2004" and
frmFilter = "19.04.2004" the query should retrieve
transactions for the period from 01.04.04 till 18.04.04.

The "Transactions" table is a linked table.
When the table was inside an Access DB everything worked
fine.

Then I moved the table to SQL server. The query started to
retrieve records for the period from 01.04.04 till
20.04.04 (one day more instead of one day less).

Why?????? Any ideas?
 
Mike said:
I have a query:

SELECT Transactions.TransactionDate,
Transactions.TransactionAmount
FROM Transactions
WHERE (((Transactions.TransactionDate) Between [Forms]!
[frmFilter]![FirstDate] And ([Forms]![frmFilter]!
[LastDate]-1)));

So, if frmFilter.FirstDate = "01.04.2004" and
frmFilter = "19.04.2004" the query should retrieve
transactions for the period from 01.04.04 till 18.04.04.

The "Transactions" table is a linked table.
When the table was inside an Access DB everything worked
fine.

Then I moved the table to SQL server. The query started to
retrieve records for the period from 01.04.04 till
20.04.04 (one day more instead of one day less).

Why?????? Any ideas?

You've shown us the query as it is as an Access query. Can you show use
how it is as an T-SQL query?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top