Subject Re: [IBO] SQLWhere + Union
Author Helen Borrie
At 10:50 AM 1/11/2005 -0200, you wrote:
>How SQLWhere method will behavior if my SQL have a UNION statement?

You must never use SQLWhere directly. It is used internally by IBO.

With UNION sets you cannot use SQLWhereItems, since the search clauses for
the contributing sets are separate and IBO's parser has no way to tell
which individual SELECT an SQLWhereItem should apply to.

If you need this capability (AND you are using Firebird 1.5!!) you can
create a view from the union and apply SQLWhereItems to a SELECT statement
on that view. Don't make very large or complex unions if you are going to
do this, as the selection process will be very slow.

Helen