Subject Re: [IBO] IBO Search does not work properly with UNION
Author Helen Borrie
At 12:16 AM 7/03/2003 +0000, you wrote:
>IBO 4.2.Ib
>If I use the search capabilities of IBO, with the proper setup,
>correctly something like:
>AND LAST_NAME STARTING 'DEVASINI'
>is added to the WHERE clause of the SQL select.
>But if there is a UNION in the SQL, the above addition is done only in
>the first query, like:
>Select age from customers
>Where LAST_NAME STARTING 'DEVASINI'
>Union
>Select age from children
>/* here is missing */
>Is it a bug? Will it be fixed/added in a short time?
>I ask this because with a selectable stored procedure it works, but
>unfortunately SP creates the entire dataset what is then limited with
>the WHERE, and it's very slow. If the problem will be fixed soon, I
>can keep using the SP until then, otherwise I've to find another
>solution :(

Marco,
Use a view for the unioned set, and apply the WHERE clause to the query on
the view.

Helen