>> FIELD1 FIELD2 FIELD3 >> D A 1 >> D B 2 >> D C 3 >> E A 4 >> E B 5 >> E C 6 >> F A 7 >> F B 8 >> F C 9 >>What I was asking, was are you trying to get from the cross-table (the first example) to the table (second example)?
>FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 FIELD7 FIELD8 FIELD9 > D D D E E E F F F > A B C A B C A B C > 1 2 3 4 5 6 7 8 9 > >Thanks PMFJI, but one way to do it could be to it with arrays like this: DIMENSION laSource[1], laTarget[1] SELECT * FROM Source INTO ARRAY laSource DIMENSION laTarget[ALEN(laSource, 2), ALEN(laSource, 1)] FOR i = 1 TO ALEN(laSource, 1) FOR ii = 1 TO ALEN(laSource, 2) laTarget[ii, i] = laSource[i, ii] ENDFOR ENDFOR CREATE CURSOR Target (Field1 <type>, Field2 <type>, ...) APPEND FROM ARRAY laTargetIf the fields in the source cursor is of different types, you would of course have to do some type-casting to be able to store the result in the target cursor.