-
Junior Member
Query to show only show the latest data
Returning only the latest record in a one-to-many query. I have two tables, one called Prop the other called PropPerm. The PropPerm table holds permanent data about a property and the Prop table holds data that changes like owners, sale prices etc. How can i run a query which will only show the latest data in the Prop table. at the moment i am getting more than one record showing because it's showing all of the previous records related to that PropPerm id. I am using Access2003.
Regards,
greg
-
Banned
Re: Query to show only show the latest data
SELECT *
FROM tbl_prop
WHERE tbl_prop.field_date >= getDate()-1
ORDER BY tbl_prop.field_date DESC
-----------------------------------------
This will help you show the latest 24 hrs data, you can replace the -1 by -2 if you want to show the latest 48 hrs; and so on for -3 and -4 ...etc.
-----------------------------------------
the above code works in sql as well as access too in the query view mode.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules