COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: vivek_cyno on 28 Jul 2012 08:25:23 PM

Title: Help on relationship
Post by: vivek_cyno on 28 Jul 2012 08:25:23 PM
Hi ,

Can anyone help me in this regard.

I have two tables.

1st table - all the values are in columns ( Parent Table )
2nd table -  all the values are in rows ( Child Table) ie Attributes are in rows.

I would like to to know how the relationship and query subject can be created.

Thanks
Title: Re: Help on relationship
Post by: tjohnson3050 on 31 Jul 2012 10:27:15 PM
I don't think you can solve this problem with a simple relationship.  You need to pivot the values in parent table from columns to rows in your data layer.

http://msdn.microsoft.com/en-us/library/ms177410(v=sql.105).aspx
http://www.oracle-base.com/articles/11g/pivot-and-unpivot-operators-11gr1.php
Title: Re: Help on relationship
Post by: vivek_cyno on 01 Aug 2012 05:06:00 AM
Thanks John!

I wonder if the pivot works..because all the values are in rows ( Child Table) ie Attributes are in rows.
Title: Re: Help on relationship
Post by: tjohnson3050 on 01 Aug 2012 04:58:42 PM
In your case, you need to use UNPIVOT on the parent table to move the values from columns to rows.
Title: Re: Help on relationship
Post by: vivek_cyno on 02 Aug 2012 03:12:39 AM
Thank you John :)