Thursday, December 8, 2011

Microsoft Access, show only the newest date?

I have a table that is called "Transactions". Within this table, it shows what project the transaction was for, how much the transaction was, and the date of the transaction. How do I show only the newest date (most recent transaction) in a query? Thanks!|||If what you want is the data for the most recent transaction overall, it would be something like





SELECT transaction, project, amount, ...


FROM some_table


WHERE transaction_date =


(SELECT MAX(transaction_date) FROM some_table)





If you're trying to do something else, it'd probably involve some GROUP BY (and possibly HAVING) logic, but I'd need more info about exactly what you wnated to accomplish.

No comments:

Post a Comment