V
Versteijn
Hello all,
I have the following test table in Access 2003:
Id test dat
1 € 5,00 1-4-2004
2 € 0,00 1-5-2004
3 € 0,00 1-6-2004
4 € 0,00 1-7-2004
5 € 0,00 1-8-2004
6 € 0,00 1-9-2004
7 € 0,00 1-10-2004
8 € 0,00 1-10-2004
9 € 0,00 1-9-2004
10 € 0,00 1-8-2004
11 € 0,00 1-7-2004
Now I do the following query:
SELECT TOP 5 *
FROM tabel1
ORDER BY dat DESC;
I expect to get 5 rows, i.e. the rows with ID 8, 7, 9, 6, and 10. I
get the following result table though:
Id test dat
8 € 0,00 1-10-2004
7 € 0,00 1-10-2004
9 € 0,00 1-9-2004
6 € 0,00 1-9-2004
10 € 0,00 1-8-2004
5 € 0,00 1-8-2004
As you can see, this result table has 6 rows instead of 5. Is this by
design? This only happens when I sort on a DateTime field, not on the
ID.
Regards,
Freek Versteijn.
I have the following test table in Access 2003:
Id test dat
1 € 5,00 1-4-2004
2 € 0,00 1-5-2004
3 € 0,00 1-6-2004
4 € 0,00 1-7-2004
5 € 0,00 1-8-2004
6 € 0,00 1-9-2004
7 € 0,00 1-10-2004
8 € 0,00 1-10-2004
9 € 0,00 1-9-2004
10 € 0,00 1-8-2004
11 € 0,00 1-7-2004
Now I do the following query:
SELECT TOP 5 *
FROM tabel1
ORDER BY dat DESC;
I expect to get 5 rows, i.e. the rows with ID 8, 7, 9, 6, and 10. I
get the following result table though:
Id test dat
8 € 0,00 1-10-2004
7 € 0,00 1-10-2004
9 € 0,00 1-9-2004
6 € 0,00 1-9-2004
10 € 0,00 1-8-2004
5 € 0,00 1-8-2004
As you can see, this result table has 6 rows instead of 5. Is this by
design? This only happens when I sort on a DateTime field, not on the
ID.
Regards,
Freek Versteijn.