Topic
  • 4 replies
  • Latest Post - ‏2012-05-09T11:24:49Z by yuvran
yuvran
yuvran
101 Posts

Pinned topic Self Join

‏2012-05-09T08:50:08Z |
Hi,

I have a employee table. It has emp_key,supervisor_key,name. I need to join emp_key with the supervisor_key to get the supervisor_name.

Created alias of employee table and trying to create relationship between the original table and the alias table. But it is not working.

Can anyone tell me how to create self join in the framework manager.

Thanks
Uv
Updated on 2012-05-09T11:24:49Z at 2012-05-09T11:24:49Z by yuvran
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: Self Join

    ‏2012-05-09T10:41:00Z  
    How did you create the alias? Are you using an Alias Shortcut, a copy of the original object, or a model query subject? Can you reproduce the problem with the Cognos sample database tables?

    What actual problem are you encountering when creating the relationship between your two objects? There are many possible ways that it could be "not working" and it is not possible to guess at which one is actually impacting you based on the information you have provided.
  • yuvran
    yuvran
    101 Posts

    Re: Self Join

    ‏2012-05-09T11:08:12Z  
    How did you create the alias? Are you using an Alias Shortcut, a copy of the original object, or a model query subject? Can you reproduce the problem with the Cognos sample database tables?

    What actual problem are you encountering when creating the relationship between your two objects? There are many possible ways that it could be "not working" and it is not possible to guess at which one is actually impacting you based on the information you have provided.
    Phil,

    Created alias shortcut for the employee table and i am trying to establish a relation between this alias shortcut and the employee table.

    When I am trying to create a relationship, employee table is not visible in the relationship definition.

    Can you tell me how to achieve self join?

    Thanks,
    Uv
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: Self Join

    ‏2012-05-09T11:14:08Z  
    • yuvran
    • ‏2012-05-09T11:08:12Z
    Phil,

    Created alias shortcut for the employee table and i am trying to establish a relation between this alias shortcut and the employee table.

    When I am trying to create a relationship, employee table is not visible in the relationship definition.

    Can you tell me how to achieve self join?

    Thanks,
    Uv
    There are several UI actions which will allow you to create a relationship. It appears that when you only select one item to initiate the creation of a relationship then FM identifies (incorrectly) that the table is already in use for the relationship and so the shortcut is not displayed. You can get around this by first selecting both the shortcut and the original data source query subject and then using the right-click option to create a relationship between the selected objects.
  • yuvran
    yuvran
    101 Posts

    Re: Self Join

    ‏2012-05-09T11:24:49Z  
    There are several UI actions which will allow you to create a relationship. It appears that when you only select one item to initiate the creation of a relationship then FM identifies (incorrectly) that the table is already in use for the relationship and so the shortcut is not displayed. You can get around this by first selecting both the shortcut and the original data source query subject and then using the right-click option to create a relationship between the selected objects.
    Thanks Phil.