Combine Queries and Multiple SQL statements for each context

Hi,

It looks like that the option to combine queries from query panel doesn’t work when you have a query using more than one context. Is that right? I get the message

This query is too complex. One of the subqueries contains incompatible objects (QP0015)

Thanks,


Schuster :united_arab_emirates: (BOB member since 2002-08-29)

Do you have the same number of result objects in each query? Do each of the result objects in each query have the same datatype in the same position in the query as the other ones? Haven’t seen the too complex message, but have seen incompatible objects when the answers to the above questions is no.


Debbie Kelly :us: (BOB member since 2002-08-15)

yes, the query is exactly the same; the only problem is that it uses two context…


Schuster :united_arab_emirates: (BOB member since 2002-08-29)

I haven’t tried to do a combined query where more than one context is involved. If I was to guess I would bet that is your problem. If you look at the sql that’s created by B/O when you do a combined query it does a union between the queries. Either one of the context-created queries doesn’t have the same number of result objects or B/O just can’t do a union between all the queries created when you have more than one context.

Not sure what version of B/O you are on, but if it is V6, you might be able to get results from one query and pass them on to a second one without using the combined query. I don’t have V6 installed yet, so I can’t tell you how to do this. If you are on V5 there probably isn’t a way to do this. Neither the Designer nor Reporter manuals mention any restrictions having to do with combined queries and contexts.


Debbie Kelly :us: (BOB member since 2002-08-15)

I don’t see any problem in my query….

A quick test, create a new report with just one shared dimension and one measure for each context, click the button combine queries from the Query Panel, and then just try to edit the SQL and you get the error message…


Schuster :united_arab_emirates: (BOB member since 2002-08-29)

I just doubt that one can create UNION/INTERSECTION/MINUS queries, when one of queries contains multiple synchronized (and not joined) SQL statements. Synchronzied queries are “Unbalanced”, therefore I do not see how one could create a UNION query etc.


Andreas :de: (BOB member since 2002-06-20)