COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: cielo on 16 Aug 2019 09:26:27 AM

Title: Filter issue
Post by: cielo on 16 Aug 2019 09:26:27 AM
I have a primary query and have a requirement to check one client number to be checked in other table client number and then print Yes/no based on the value availability.I could not join these queries at Report level as the joining will give incorrect result.Joining will give only matched rows though my requirement is not that. Only for the specific column I would like to check in other query ...Query1 has Customer number and Query 2 has customer number ...I would like to  write a case statement if Quer1.client number present in Query2 without joining.. Please provide your inputs.  Thanks
Title: Re: Filter issue
Post by: CognosBIUser1 on 26 Aug 2019 08:33:02 AM
Hi,

I did not quite understand why you can not join ? there is different types of join that will give you different results.
cant you just have the queries only with the column that you need ?
Please explain with example.

Regards,
Sugan
Title: Re: Filter issue
Post by: Penny on 26 Aug 2019 10:46:03 AM
You can use an outer join on the second table in your report (minimum cardinality is zero 0:1 or 0:n on the side of the relationship that has table 2).  In the resulting query you will have all records from the first table and if there is not matching record in table 2 the columns pulled from that table will be empty.  Then you can test the table 2 values in your resulting query or in a query item - if empty then no match in table 2, if populated then there is a match in table 2.
Title: Re: Filter issue
Post by: cielo on 26 Aug 2019 04:45:58 PM
Thank you for the responses.issue got resolved by outer join and writing a free hand sql.