COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Patrick77 on 29 Sep 2016 12:31:42 PM

Title: Combine distinct IDs from 2 queries in a 3rd query filter ??
Post by: Patrick77 on 29 Sep 2016 12:31:42 PM
Hello,
I am combining entries from 2 queries in a filter for a 3rd query.  Essentially, Query1 and Query2 grab IDs from disparate sources and I would like to filter on these only once.  Right now I have this, and it works if I allow for cross joins, but I am not sure if duplicates are retained:

[SQL3].[ID] IN  ([Query1].[ID], [Query2].[ID])

Is there a function to  subset distinct from this:  ([Query1].[ID], [Query2].[ID])

I have tried coalesce, distinct, unique ... each throws a parsing error.

I am basically trying to make the query run faster and don't want it to look for the same data multiple times.
Title: Re: Combine distinct IDs from 2 queries in a 3rd query filter ??
Post by: Invisi on 03 Oct 2016 04:28:39 AM
Why don't you solve this in your data warehouse?