You're welcome.
>Hi Sergey,
>Thanks, it was the cursor name of "a", when I changed it to nomaster the problem stopped.
>I will try the other things later.
>
>Have a good day.
>
>>1. There's no need to include DISTINCT because UNION does implicit DISTINCT on the result set
>>2. For EXISTS type subqueries there's no reason to use anything but '*' in the field list because they don't return any record set
>>3. The 'a' is not a good name for a cursor because it conflicts with the default name for the first workarea.
>>
>>SELECT table1.f1 FROM table1 ;
>> WHERE NOT exist ;
>> (SELECT * FROM table3 WHERE table3.f1 = table1.f1) ;
>>UNION ;
>>SELECT table2.f1 FROM table2 ;
>> WHERE NOT exist ;
>> (SELECT * FROM table3 WHERE table3.f1 = table2.f1) ;
>>INTO CURSOR crsResult NOFILTER
>>
>>>
--sb--