COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: masha2008 on 13 Nov 2008 11:31:33 AM

Title: JOIN Help!!
Post by: masha2008 on 13 Nov 2008 11:31:33 AM
Based on this SQl I have to write a report in Report Studio
The code is like this



select T1."ACCOUNT" "c1" ,
       T4."ACCOUNT" "c5" ,

from "ACCT_DIM" T1,
     "ACCT_DIM" T4,
     "ACCT_GL_FACT" T6,

where and T6."GL_ACCT_KEY" = T1."ACCT_KEY"
      and T6."ACL_ACCT_KEY" = T4."ACCT_KEY"
      and T4."ACCOUNT" = '11'


When I ran it, I need one column with  ACCOUNT based on GL_ACCT_KEY, and the other column based on ACL_ACT_KEY.
Do I drag ACCOUNT data item to my report twice, and then go from there creating joins? So far everything I tried gives me empty report or both columns with the same account number
My output should be
ACCOUNT......ACCOUNT
13425........11
23456........11
5673.........11

Both of these accounts are coming from the same column..
Title: Re: JOIN Help!!
Post by: VisioX on 14 Nov 2008 04:57:56 PM
For starters....

If I read this right, your T1 and T4 definition makes no sense.
It is the same file!
Title: Re: JOIN Help!!
Post by: blom0344 on 15 Nov 2008 04:28:40 AM
Ever heard of SQL aliases?   ;D
Title: Re: JOIN Help!!
Post by: VisioX on 17 Nov 2008 07:16:58 AM
Quote from: blom0344 on 15 Nov 2008 04:28:40 AM
Ever heard of SQL aliases?   ;D
Me or masha?
I did, but it still makes no sense for such a complex SQL statement ;D
Title: Re: JOIN Help!!
Post by: Suraj on 18 Nov 2008 12:28:40 PM
No update in this issue.
Hopefully, it is resolved. :)