Query with top 15 sorted ascending

Mister-B

New member
Local time
Today, 05:21
Joined
Apr 10, 2020
Messages
18
Hello all,

I have a user form that shows, among a lot of other information, the last 15 records of the table that were added. To do that I found these snippets of SQL that work:

SELECT TOP 15 Daten.FoBiID, Daten.Jahr, Daten.Fortbildung, Daten.Von1, Daten.Bis1, Daten.Kennziffer, Daten.Aktenzeichen, Daten.FoBi_Key
FROM Daten
ORDER BY Daten.FoBiID DESC;

Unfortunately the 15 records are shown in descending order meaning that the last is at the top. How can I modify the code to still show the last 15 records but in ascending order with the youngest record at the bottom. If I change the SQL order to ASC, it shows me the very first 15 records from the table.

Thanks and kind regards,
Martin
 
Create a second query that sorts this query the way you want it to appear.

Code:
SELECT *
FROM YourQueryNameGoesHere
ORDER BY Daten.FoBiID
 
Use it as a subquery?
 
Create a second query that sorts this query the way you want it to appear.

Code:
SELECT *
FROM YourQueryNameGoesHere
ORDER BY Daten.FoBiID
Thanks GPGeorge. I never knew that was possible. That's exactly what i needed.
 

Users who are viewing this thread

Back
Top Bottom