manojkrghosh
Technical User
I have created a MSTR report from a single table only. The report is basically very simple. The Database it is connecting to is Teradata V"R4. But when I checked the generated SQL, it is showing a surprise Cross Join. The SQL is given below...
select a11.YEAR_NO YEAR_NO,
a11.WEEK_NO WEEK_NO,
a11.STORE_CD STORE_CD,
a11.DEPARTMENT_CD DEPARTMENT_CD,
a11.REGION_CD REGION_CD,
sum(a11.DIFF_AMT_CST) WJXBFS1,
sum(a11.DIFF_AMT_RTE) WJXBFS2,
sum(a11.JOURNAL_AMT_CST) WJXBFS3,
sum(a11.JOURNAL_AMT_RTE) WJXBFS4
from SSA_JOURNAL_OVERRIDE a11
cross join SSA_JOURNAL_OVERRIDE a12
group by a11.YEAR_NO,
a11.WEEK_NO,
a11.STORE_CD,
a11.DEPARTMENT_CD,
a11.REGION_CD
I want to remove this "Cross Join". Can anybody help me out in this regard. I shall be thankful to you...
Regards,
Manoj
select a11.YEAR_NO YEAR_NO,
a11.WEEK_NO WEEK_NO,
a11.STORE_CD STORE_CD,
a11.DEPARTMENT_CD DEPARTMENT_CD,
a11.REGION_CD REGION_CD,
sum(a11.DIFF_AMT_CST) WJXBFS1,
sum(a11.DIFF_AMT_RTE) WJXBFS2,
sum(a11.JOURNAL_AMT_CST) WJXBFS3,
sum(a11.JOURNAL_AMT_RTE) WJXBFS4
from SSA_JOURNAL_OVERRIDE a11
cross join SSA_JOURNAL_OVERRIDE a12
group by a11.YEAR_NO,
a11.WEEK_NO,
a11.STORE_CD,
a11.DEPARTMENT_CD,
a11.REGION_CD
I want to remove this "Cross Join". Can anybody help me out in this regard. I shall be thankful to you...
Regards,
Manoj