SELECT TOP 6 VE.ANNO FROM VE GROUP BY ANNO
is this the fast way to extract top 6 ANNO in Access table with approx 165.xxx records?
Note:
ANNO is indexed
SELECT TOP fast way...
-
- Administrator
- Posts: 78513
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- Administrator
- Posts: 78513
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: SELECT TOP fast way...
By the way, if you want to select the 6 most recent years, you must sort in descending order:
SELECT TOP 6 ANNO FROM VE GROUP BY ANNO ORDER BY ANNO DESC
SELECT TOP 6 ANNO FROM VE GROUP BY ANNO ORDER BY ANNO DESC
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4357
- Joined: 26 Apr 2010, 17:36
Re: SELECT TOP fast way...
TKS!HansV wrote:By the way, if you want to select the 6 most recent years, you must sort in descending order:
SELECT TOP 6 ANNO FROM VE GROUP BY ANNO ORDER BY ANNO DESC