COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Mita on 27 Sep 2016 11:35:08 PM

Title: generated query in repor
Post by: Mita on 27 Sep 2016 11:35:08 PM
Hi All,

I have done union of two fact tables in report studio.but when i generate the query its not doing the union and the data is also coming for one fact table not both..
M i missing anything?
Title: Re: generated query in repor
Post by: saumil287 on 28 Sep 2016 12:07:53 AM
That's strange,
but first try in FM to union 2 queries, also check the total number of rows in new generated query.


Thanks
Title: Re: generated query in repor
Post by: BigChris on 28 Sep 2016 05:58:49 AM
Do your columns match up between the two queries? Also, bear in mind that the field names will be taken from the first query in the union, so it might be difficult to know which query they're coming from. One way round that is to add an identifier column in each of the two queries so that you can see which one the data is coming from in the union.
Title: Re: generated query in repor
Post by: MFGF on 29 Sep 2016 03:08:50 AM
Quote from: Mita on 27 Sep 2016 11:35:08 PM
Hi All,

I have done union of two fact tables in report studio.but when i generate the query its not doing the union and the data is also coming for one fact table not both..
M i missing anything?

As a sanity check, can you list the steps you took? Are you sure you are basing your report on the items from the query resulting from the union, and not from one of the underlying queries?

MF.
Title: Re: generated query in repor
Post by: Mita on 04 Oct 2016 05:05:04 AM
yes , its showing the union but again its doing a full outer join. :(
Title: Re: generated query in repor
Post by: MFGF on 04 Oct 2016 05:32:06 AM
Quote from: Mita on 04 Oct 2016 05:05:04 AM
yes , its showing the union but again its doing a full outer join. :(

It sounds to me like you are getting a stitch query? Are you familiar with modelling your data in Framework Manager? If so, you need to look carefully at your model to determine which relationships are causing this query split and fix your model accordingly. If you're not a modeller, you should go and discuss this with the person who built your model.

Cheers!

MF.
Title: Re: generated query in repor
Post by: Mita on 04 Oct 2016 06:06:53 AM
Thank you for the suggestion..:)