When looking for data in our Sage accounts program I like to use MSQuery and Excel.
Typically I will use something like this to limit the data to a given month.
|Document _Type| Document_Date|
| 4 or 5 | Between 01/01/2019 and 31/01/2019|
and this will give me all documents of type 4 or 5 during month of January which I want.
However if I perform the query a second time I only get the documents of type 4 and when I look at the query again it looks like_
|Document_Type| Document _Date |
| 4 | Between 01/01/2019 and 31/01/2019|
OR | 5 | Between 01/01/2019 and 31/01/2019|
and this only gives me the documents of type 4. for the month of January
When I look at the SQL statements they are different
Please Login or Register to view this content.
I over come the difficulty by using the correct SQL statement in my code. It would be much easier just to refresh the query. How should I use MSQuery to give me the desired result and stop it changing itself to give the wrong result?Please Login or Register to view this content.
John
Bookmarks