>>sele a.idfld ; >> from 'history\frames' a ; >> where SomeCondition ; >> into cursor cur_temp1 >> >>sele a.idfld ; >> from 'current\frames' a ; >> where ; >> SameCondition .and. ; >> a.idfld not in (select temp.idfld from cur_temp1) ; >> into cursor cur_temp2 >> >>(make cur_temp1 read/write) >> >>sele cur_temp1 >>append from cur_temp2 >>use in cur_temp2>>
>SELECT hist.idfld1 FROM history\frames hist ; > WHERE SomeCondition ; > UNION ALL ; > SELECT cur.idfld1 FROM current\frames cur ; > WHERE SomeCondition AND cur.idfld1 NOT IN (SELECT idfld1 FROM history\frames WHERE Somecondition) ; > INTO CURSOR combined >>I think that should work.