• Thanks, what I want to do is for each employee and for each product i wan to find the first month where YTDRate > IntRate. If it is, update the status to "exceeds rate".

    So for empNum = 1111, product = prd1 the first month is 1 whereas for prd2, the first month is 5.

    For empNum = 2222, product = prd1 it is 2, but for prd2 it is 3

    and for empNum = 3333 and prd2 the first month is 2.

    For the above rows, status will be updated to "exceeds rate" but left null for other months even if

    ytdRate > intRate.