>Hi All,
>
>I have 2 Cursors:
>Cursor A: aaa bbb ccc
>Cursor B: ddd eee fff
>
>I want to combine the two cursors into 1 cursor:
>Cusror C: aaa bbb ccc ddd eee fff <--- This is one new record
>
>I don't have an id per each cursor since cusor A or cursor B could be
>a JOIN of other tables as well.
>
>I could create an id per each cursor but that may take time if I have
>200,000 records per each cusror. Also I can not do an sql on the RECNO()
>of each cursor(that could be good). Each cursor has same amount of records.
>
>Any ideas are appreciated.
>
>Regards,
>
>Doron
You can do it using just select statements
SELECT aaa, bbb, ccc, RECNO() as rn ;
FROM table1 ;
INTO CURSOR temp1
SELECT ddd, eee, fff, RECNO() as rn ;
FROM table1 ;
INTO CURSOR temp2
SELECT aaa, bbb, ccc, ddd, eee, fff ;
FROM table1 Join ON temp1.rn = temp2.rn ;
INTO CURSOR ResultCursor
--sb--