I only need to select the oldest of the 2 records in bold, based on the date. The dates and cells change so I can't "hardcode" those fields in the query. I need to come up with some group by clause I think and select the oldest one based on that date.
The result of the query should be:
Code:
[U]Cell Shift Date Units Pct [/U]
123-AB 1st Shift 2006-05-03 2752 128.71
123-AB 2nd Shift 2006-05-03 2328 108.88
[b]123-AB 3rd Shift 2006-05-03 2121 106.58
123-AB 3rd Shift 2006-05-04 1809 121.21[/b]
456-AB 1st Shift 2006-05-03 2328 108.88
456-AB 2nd Shift 2006-05-03 2121 106.58
456-AB 3rd Shift 2006-05-04 1809 121.21
Code:
[U]Cell Shift Date Units Pct [/U]
123-AB 1st Shift 2006-05-03 2752 128.71
123-AB 2nd Shift 2006-05-03 2328 108.88
123-AB 3rd Shift 2006-05-03 2121 106.58
456-AB 1st Shift 2006-05-03 2328 108.88
456-AB 2nd Shift 2006-05-03 2121 106.58
456-AB 3rd Shift 2006-05-04 1809 121.21