COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: davidcognos on 21 Oct 2010 12:36:29 PM

Title: Join b/w tables- Key not defined for table in DB
Post by: davidcognos on 21 Oct 2010 12:36:29 PM
Hi,

We have to join two tables and fetch the data for report. In the first table the key is defined in the database which is the common column of second table. But for the second table this common column is not defined as the key and the table has no key defined in the database. We have defined join in the Framework manager with that common column but the data is obviously duplicate. Is there any process in Framework manager which can make the column of second table as key? The database is relational. Does creating a determinant and defining the key for the second table solves the issue?
We have checked by creating the determinant also.But there is no use, still we get the duplicate data.

At the report level we have grouped all the columns and duplicacy was gone. Bur our query is that, can we achieve this in Framework manager by creating the determinant?

Thanks in Advance!!!!

Regards
Title: Re: Join b/w tables- Key not defined for table in DB
Post by: cognostechie on 21 Oct 2010 02:03:18 PM
When you say 'second table', did you mean that is the Fact table in the database. If so, the 'common column' as you refer may not be defined as a key. That is a normal scenario.

Now are you sure that the data is 'duplicating' ? It might be possible that there are multiple rows in the Fact table with a difference in atleast one of the columns indicating that the data is actually different and not duplicating. If you think it is still duplicating, yes, you can solve this by determinants. When you set the determinants, you can 'Group' it by that common column. Join this to the query subject of the first table.
Title: Re: Join b/w tables- Key not defined for table in DB
Post by: MFGF on 22 Oct 2010 06:26:13 AM
You can also try setting the Usage property of the common column in the second table to 'Identifier'.  My guess is it's set to Attribute at the moment?

MF.