I have a TargetHit table that has the fields:
What I need to do is, for each instance of userID, Year, Month where target hit is 0 (target not hit). Look for the next earliest Year and month for that user where the target was hit and return the month and year to show something like.
Does anyone know of a way to do this without having to do a for each loop and loop through each instance of UserID, Year and Month.
Thanks in advance