use t1 >nFields1 = afields(aT1) >for ix = 1 to nFields1 > aT1[ix,1] = "a_"+aT1[ix,1] >endfor >select 0 >use t2 order tag key >nFields2 = afields(aT2) >for ix = 1 to nFields2 > aT2[ix,1] = "b_"+aT2[ix,1] >endfor >select 0 >use t3 order tag key >nFields3 = afields(aT3) >for ix = 1 to nFields2 > aT3[ix,1] = "c_"+aT3[ix,1] >endfor >dimension aStruc(nFields1+nFields2+nFields3,alen(aT1,2)) >acopy(aT1,aStruc) >acopy(aT2,aStruc,1,-1,nFields1*alen(aT1,2)+1) >acopy(aT3,aStruc,1,-1,(nFields1+nFields2)*alen(aT1,2)+1) >create cursor mycursor from array aStruc >select t1 >set relation to key into t2, key into t3 >set skip to t2,t3 >scan > for ix = 1 to fcount() > store eval(field(ix)) to ("m.a_"+field(ix)) > endfor > select t2 > for ix = 1 to fcount() > store eval(field(ix)) to ("m.b_"+field(ix)) > endfor > select t3 > for ix = 1 to fcount() > store eval(field(ix)) to ("m.c_"+field(ix)) > endfor > insert into mycursor from memvar > select t1 >endscan >select mycursor >browIf not on the same row then things are easier, set skip is not used, in the main scan two other scans for childs are done.