spiff2002
IS-IT--Management
- Jan 31, 2003
- 40
We have a table where we keep track of inventory received from our suppliers. Obviously the table can have multiple entries for the same Item but their dates and Qty received are different.
The table should look like this:
Table receipt
item_id Qty Date_recived
1 20 11/11/03
3 40 11/10/03
6 30 11/10/03
1 45 11/08/03
3 40 11/07/03
: : :
: : :
: : :
47 30 01/03/03
I need to run a Query that selects the most recent entrie for each item within a date range
For instance the result on the previous table with dates 01/01/03 to 11/30/03 should be:
1 20 11/11/03
3 40 11/10/03
6 30 11/10/03
47 30 01/03/03
Thanks a lot for any clue that anyone can give me on this.
The table should look like this:
Table receipt
item_id Qty Date_recived
1 20 11/11/03
3 40 11/10/03
6 30 11/10/03
1 45 11/08/03
3 40 11/07/03
: : :
: : :
: : :
47 30 01/03/03
I need to run a Query that selects the most recent entrie for each item within a date range
For instance the result on the previous table with dates 01/01/03 to 11/30/03 should be:
1 20 11/11/03
3 40 11/10/03
6 30 11/10/03
47 30 01/03/03
Thanks a lot for any clue that anyone can give me on this.