I have a table (tblCostHistory) in Access 2000 with records like this:
PartID MyDate Cost
1 4/3/2004 $11.52
1 5/1/2004 $11.56
1 6/1/2004 $11.60
2 3/2/2003 $25.15
3 8/2/2003 $37.19
3 1/9/2004 $37.22
3 7/8/2004 $37.15
For a given date, I want to extract only the price that was current at that date for each PartID. For example, for date 4/19/2004, I would get:
PartID MyDate Cost
1 4/3/2004 $11.52
2 3/2/2003 $25.15
3 1/9/2004 $37.22
Everything I've tried gives me multiple records for some PartIDs. Need help from a clear-thinking SQL specialist, please.
PartID MyDate Cost
1 4/3/2004 $11.52
1 5/1/2004 $11.56
1 6/1/2004 $11.60
2 3/2/2003 $25.15
3 8/2/2003 $37.19
3 1/9/2004 $37.22
3 7/8/2004 $37.15
For a given date, I want to extract only the price that was current at that date for each PartID. For example, for date 4/19/2004, I would get:
PartID MyDate Cost
1 4/3/2004 $11.52
2 3/2/2003 $25.15
3 1/9/2004 $37.22
Everything I've tried gives me multiple records for some PartIDs. Need help from a clear-thinking SQL specialist, please.