Use of Multiple Contexts with Subqueries

Does anyone have any advice for using a subquery with one context to pass values back to the outer query with a different context. I have already enabled the “Allow selection of multiple contexts” option in Universe parameters, but despite my efforts, they will not use separate contexts. Thanks in advance.

Eric Vallo
SBC Communications


Listserv Archives (BOB member since 2002-06-25)

Does anyone have any advice for using a subquery with one context to pass values back to the outer query with a different context. I have already enabled the “Allow selection of multiple contexts” option in Universe parameters, but despite my efforts, they will not use separate contexts. Thanks in advance.

Eric Vallo
SBC Communications

============

BO support is well aware of this one…

As you discovered, the tool insists on evaluating both the main query and subqueries within a single context. We have been dealing with this same issue since last fall. At that time we were developing on 4.1.4. We pushed hard to get this added their 5.x enhancement list. But we are now testing 5.0.2 and the fix still isn’t there.

The workaround we use is to force 2 independent queries to be generated, but it doesn’t help much because the 2 sets are merged together via outer join. Fortunately for us the use of subqueries are an advanced topic and the majority of our users are afraid to use them :slight_smile:

Jon D. Chick
Merck & Co., Inc.


Listserv Archives (BOB member since 2002-06-25)

Comments: RFC822 error: MESSAGE-ID field duplicated. Last occurrence
was retained.

At 03:24 PM 4/19/00 -0400, you wrote:

Does anyone have any advice for using a subquery with one context to pass values back to the outer query with a different context. I have already enabled the “Allow selection of multiple contexts” option in Universe parameters, but despite my efforts, they will not use separate contexts. Thanks in advance.

Eric Vallo
SBC Communications

============

BO support is well aware of this one…

As you discovered, the tool insists on evaluating both the main query and subqueries within a single context. We have been dealing with this same issue since last fall. At that time we were developing on 4.1.4. We pushed hard to get this added their 5.x enhancement list. But we are now testing 5.0.2 and the fix still isn’t there.

The workaround we use is to force 2 independent queries to be generated, but it doesn’t help much because the 2 sets are merged together via outer join. Fortunately for us the use of subqueries are an advanced topic and the majority of our users are afraid to use them :slight_smile:

Jon D. Chick
Merck & Co., Inc.

I have just solved a similar problem I was banging my head against. Here’s my solution, if it’s of any help. I have only a single query, but want data from two contexts. In this case, I have data that includes products, transactions, and categories. Products are in a one-to-many relationship with both categories and transactions (a product may be in more than one category, and may also have more than one transaction), so I have two contexts (transactions and categories). I want to count transactions in categories, and I want to be able to count each transaction more than once if it falls in more than one category. I solved my problem by including the product code twice in the query, once from each context (along with the count of transactions and category codes). I then was edited the format to get rid of both product codes, and was left with transaction counts and categories.

Helen Hutchison
Geoworks


Listserv Archives (BOB member since 2002-06-25)