COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: mvn.balu on 20 Jun 2012 09:56:28 AM

Title: How to create relational join with multiple columns in framework manager
Post by: mvn.balu on 20 Jun 2012 09:56:28 AM
Hi ,

Need help on create a connection  with multiple columns,   The problem is i have to tables table 1 and table 2 in the fileds like this

Table 1                                      Table 2
-------------                               -------------
licenseno_01                         Licenseno
licenseno_02
Licenseno_03
Licenseno_04

these are the Key columns.
so how to join these columns .
I try to join like this  but am not get the result
licenseno_01=Licenseno and licenseno_02=Licenseno and licenseno_03=Licenseno and licenseno_03=Licenseno


Please let me now is any other way to resolve this please.
Title: Re: How to create relational join with multiple columns in framework manager
Post by: MFGF on 20 Jun 2012 10:02:57 AM
Hi,

You don't indicate what data values exist in any of these columns. Without knowing this it's nigh on impossible to advise you on how they can be used in a join. You don't have to give us real data - just a made-up example of the values in each column, and what you want to do with the result of the join.

Regards,

MF.
Title: Re: How to create relational join with multiple columns in framework manager
Post by: mvn.balu on 20 Jun 2012 11:14:49 AM
Both tables having numeric values.

Assume table-2 has 10 distinct license numbers like 1,2,3,4,5,6,7,8,9,10 under "LICENSE_NO" column.

And the table-1 also have the same above license numbers and there may be possible to have NULLS also,
but those are splitted into multiple columns say,
under License No_1 ---> 2,4,5
         License No_2  ----> 1,3,6
         License No_3   --->  7
        License NO_4   --->  8, NULL, `10.

Not mandatory to have all those license numbers to be there in TABLE-2,  that what we have in Table-1...
Title: Re: How to create relational join with multiple columns in framework manager
Post by: MFGF on 20 Jun 2012 11:24:48 AM
It looks to me like you need to have four role-playing versions of Table2 in your model - each joined to a different License_no column in Table1. It all depends on what result you need to achieve, though.

Regards,

MF.
Title: Re: How to create relational join with multiple columns in framework manager
Post by: bi4u2 on 20 Jun 2012 02:05:06 PM
I agree with MFGF. Create 4 alias tables in your database layer on Table 2 so that you can set up each of these 4 scenarios. Alias tables are meant to have their own independent join path.
Title: Re: How to create relational join with multiple columns in framework manager
Post by: mvn.balu on 21 Jun 2012 12:43:04 AM
Hi i created the 4 alias and joined in Database view . but  while join these tow tables columns in the  query studio i am getting error like     RQP-DEF-0103          Cross joins (between query subjects .    Is mandatory to add those alias in to other view also ?
Title: Re: How to create relational join with multiple columns in framework manager
Post by: bi4u2 on 25 Jun 2012 01:36:42 PM
Well yes, you would need to create a query subject in your transformation/logical layer that refers to items in the Alias tables you created.
Title: Re: How to create relational join with multiple columns in framework manager
Post by: pricter on 26 Jun 2012 05:03:13 AM
Instead of you using AND on your joins I think it should be a good idea to use OR in the join expression