CREATE CURSOR Result ( F1 C(1),F2 C(10), F3 C(10)) * table1,table2,table3 have no index active SELECT table1 maxSet =RECCOUNT() IF RECCOUNT('table2')>m.maxSet SELECT table2 maxSet =RECCOUNT() SET RELATION TO RECNO() INTO table1 ELSE SET RELATION TO RECNO() INTO table2 ENDIF IF RECCOUNT('table3')>m.maxSet SET RELATION TO RECNO() INTO (ALIAS()) IN table3 SELECT table3 ELSE SET RELATION TO RECNO() INTO table3 ENDIF SCAN INSERT INTO Result (table1.field,table2.field,table3.field) ENDSCAN * remove relationsFabio