>FOR nMonth = 1 TO 12 > * Get the Carrier ID (Matches GrpID and PlanKey) > * and the Benefit Name (Matches PlanKey). > lcCursor = "tmpNearly" + PADL(nMonth, 2, "0") > > UPDATE (lcCursor) SET CarrID = G.Carr, Benefit = G.CovDesc8 ; > FROM GrpsPlansCarrs G WHERE &lcCursor..GrpID + &lcCursor..PlanKey = g.Full_Key > > * You should replace g.Full_Key to whatever the key is on GrpsPlansCarrs >ENDFOR >You need to use JOIN condition, e.g.
UPDATE cur SET CarrID = G.Carr, Benefit = G.CovDesc8 ; FROM GrpsPlansCarrs G INNER JOIN (lcCursor) cur ; ON cur.GrpID + cur.PlanKey = g.Full_Key