COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: que1983 on 09 Nov 2016 09:56:17 PM

Title: Query multple joins
Post by: que1983 on 09 Nov 2016 09:56:17 PM
Here are the tables

table1

[Presentation Layer].[LOAN MORTGAGE TERMS].[Loan Number]

[Presentation Layer].[LOAN CODES].[Code Description]

table2

[Presentation Layer].[LOAN HISTORY].[Loan Key]

[Presentation Layer].[LOAN HISTORY].[Date of Decision]

table3

[Presentation Layer].[LOAN EVENT DATE].[Loan Key]

[Presentation Layer].[LOAN EVENT DATE].[Event Date]

Note Loan Key is the same as loan number.  Heres my question.  I know I can create a report query and link table1 and table 2 by loan number and loan key.  Is there a way to also link table 3 and do a 3 way query relationship?  For table 2 and 3 I need the max or last value
Title: Re: Query multple joins
Post by: Invisi on 10 Nov 2016 02:24:25 AM
If the join is not already defined in your framework, then... use a join???? How much do you know of Cognos and Report Studio?
Title: Re: Query multple joins
Post by: BigChris on 10 Nov 2016 02:51:43 AM
You'll have to do it in two jumps assuming it isn't already done in FM). Query 1 to bring back the data from Table 1 then Query 2 to bring back the data from Table 2. Join those two together to give you Query 3. Create Query 4 to bring back the data from Table 3. Then join Query 3 to Query 4 to give you Query 5. Base your list on Query 5.