I have an application that records weight of a bin holding items in inventory into a Microsoft Access Table Like so:
Id(AutoNumber) Timestamp Weight
-------------------------------------
1 Jan 1 1
2 Jan 2 1
3 Jan 3 2
4 Jan 4 2
5 Jan 5 2
6 Jan 6 3
7 Jan 7 3
8 Jan 7 3
9 Jan 8 2
10 Jan 8 2
11 Jan 9 7
12 Jan 10 4
13 Jan 10 4
Note that weight may change from day to day. Sometimes the weight will not change for days. I want to output a report listing only the weight when it has changed and not repeat the row if the weight does not change, like so (ID field not necessary):
Timestamp Weight
----------------------
Jan 1 1
Jan 3 2
Jan 6 3
Jan 8 2
Jan 9 7
Jan 10 4
I can do this using code either in VB or in an Access Module, writing it to a temp table etc. But is there a way to do this just using SQL queries (views), including subqueries? I am thinking I should be able to write one query using GROUP By clause to get the 'FIRST' item and another query to join with the first one, but have this feeling this cannot be done at all without writing some code. (This application will be on a web site - Access is not good with temporary tables for multiple users)