hello Fabio
as i mentioned to Fred this won't work, because the sql command will open the history table 1st. since the history and the current table have the same name, when it comes to open the current table it will think it can use an internal 'copy' of the 'other' (history) table.
because of this the resulting cursor does not contain the correct records. i solved this by pre-opening the 2 tables with 2 different alias names and then giving the sql those alias names to work with. therfor the querry does not decide anymore which tables it has to open, since they are already open.
Thanks.
>Hi gunnar,
>
>try this
>
>SELECT hist.idfld1 FROM history\frames hist ;
>WHERE SomeCondition ;
>UNION ;
>SELECT cur.idfld1 FROM current\frames cur ;
>WHERE SomeCondition;
>INTO CURSOR combined
>
>
>Fabio