I totally agree that it does not work. If the result is unpredictable, it does not work, simple. In my current job, we work with raw data and I don't build standalone EXEs any more. Everyone works with DELETED = OFF, so that is why I was using DELETED() in the SQL. Well, from now on, any processes that I need to create and run will have DELETED = OFF and I will restore the DELETED value upon exit.
Thank you, Sergey.
David
David