CREATE CURSOR _result (aaff I, abff I, acff I) APPEND BLANK for xks = 0 to 2 cmd = "UPDATE _result SET " + substr([aa,ab,ac,ad],3*xks+1,2) + "ff=" + TRANSFORM(xks) EXECSCRIPT(cmd) endfor SELECT * FROM _result