Hello,
I have a database that I am putting together for a Ranch that grows trees. They have a planting plan for what rootstocks of those trees end up being planted and where and how many in each planting row. The plan tracks different treatments (things that are done to the rootstocks like soaking, etc.) that are done to the rootstocks so this plan may have the same rootstock in the same row but is signified as different by the planting order on the rootstock. This plan ends up being transferred to another table where the rootstock treatments don't matter, so as long as two planting rows with everything being equal (Ranch-Block-Row-subRow-Rootstock) and the planting order is sequential (1,2,..), I only need to keep the first row in the sequence (and add all totals from the deleted rows to the first row) but if there is a different rootstock in the third position and goes back to the same one for the first and second position in the fourth position, then the fourth position needs to be kept and not deleted. I have attached the image of what I am trying to get across. In the table here, I need a query that would delete the second row because the only difference between it and the first row is the planting order and it is touching (in sequence) with the first row AND the totals (not shown) from the second row should be added to the first. The third row would be kept and the fourth row would also be kept (even though it is the same as 1 and 2 but it is NOT in sequence).
Thanks in advance for any help you can provide.