Hi Mark,
Maybe something in the UDF causes this? Can you post UDF code?
>Hi Sergey,
>
>I'll gather the info and mail it to you so you can try to reproduce it. I could try the mem functions en I'll try to rename the cursor. The option not to use the UDF will probably not do any good. As I mentioned in the beginning, the query works fine when I delete some records from one of the tables in the select. So if the select takes a little less time (or memory) it works fine again.
>
--sb--