Skip to Content
author's profile photo Former Member
Former Member

Join of queries

Hello All

Can someone tell me how to join two queries without using a multicube

or infoprovider option.

First Query has x, y, z fields

Second Query has x,a,b fields

now can i join the first and second query by the common field x.

Without changing the infoprovider or multicube design,i want to join

the query at the query level.

I want to join the two queries using common field x and then replace

the second query a, b fields with y, z fields data of query1.

Regards

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 01:56 PM

    You can't join two query; if you don't want to use a multiprovider and the queries have a fixed structure you can try to do that with a workbook.

    Hope it helps.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 03:06 PM

    Hi Santosh.

    If you want to use the workbook solution you should create one sheet for each query.

    Lets assume that you have X in column A in both sheets and Y and Z in column B and C in sheet1. For the columns D and E on sheet1 you should insert some VB-code that gets the data from sheet2 where X equals X from sheet1. Here is an example:

    =IF(ISNA(VLOOKUP(A1;sheet2!$A$1:$B$200;2;FALSE));"";(VLOOKUP(A1;sheet2!$A$1:$B$200;2;FALSE)))

    You will have to use this code for all the rows along the column. I.e. if A has an output of 200 rows, you will need the code from line 1->200. You will also have to consider that the results may be more in the future.

    Hope it helps.

    BR

    Stefan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.