J Joe M Dec 20, 2004 #1 Hi, how do I create a query to list only the last 50 latest records of a table????
F fredg Dec 20, 2004 #2 Hi, how do I create a query to list only the last 50 latest records of a table???? Click to expand... Create a Top 50 query and sort on the date field (or whatever field determines what is latest or oldest) descending. Create a regular Select Query, then click on the Top Values tool button (it probably says "All" at the present time) and enter the value. SELECT TOP 50 TableName.*, TableName.DateField FROM TableName ORDER BY TableName.DateField DESC;
Hi, how do I create a query to list only the last 50 latest records of a table???? Click to expand... Create a Top 50 query and sort on the date field (or whatever field determines what is latest or oldest) descending. Create a regular Select Query, then click on the Top Values tool button (it probably says "All" at the present time) and enter the value. SELECT TOP 50 TableName.*, TableName.DateField FROM TableName ORDER BY TableName.DateField DESC;
J Joe M Dec 22, 2004 #3 Thanks Fredg, It works, now I can list only the 50 latest records. But now I also need the 50 records to be sort aphabetically using the Name field, how do I get it to sort aphabetically?? Thanks.
Thanks Fredg, It works, now I can list only the 50 latest records. But now I also need the 50 records to be sort aphabetically using the Name field, how do I get it to sort aphabetically?? Thanks.