Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 1065

Caclulation View with Star Join returns no data if field is not part of Group By clause

$
0
0

Hi Guys,

 

 

I have two flags created called 'CC_Manual_JV_Line_Flag' and 'CC_Reversed_Accruals' on star join node which returns either 'Y' or 'N'. There is also another flag called 'CC_Posting_Date' which is present on another projection node. While firing query against the view, I am forced to add Group by clause for specific field even if there is no aggregation in query to return data.

 

 

Below query is my basic query and I am getting results as expected. I have attached screenshots of multiple scenarios which will help in explaining the issue.

 

 

 

SELECT

"CC_Reversed_Accruals",

"CC_Manual_JV_Line_Flag"

FROM "_SYS_BIC"."******************"

WHERE (("CC_Manual_JV_Line_Flag" IN ('Y'))) AND

(("FISCYEARPER" BETWEEN ('2016001') and ('2016001'))) AND

"CC_Posting_Date" <= '2016/01/15'

 

 

 

For Scenario1 & 2, view is returning data as expected. In scenario1, you can see both the fields are  part of group by clause whereas in scenario 2, they are not part of Group By clause and still returning data which is expected.

 

 

 

In scenario 3, just one flag 'CC_Manual_JV_Line_Flag' is part of the select statement and returns result which doesn't require any group by clause

 

 

Now, if you look at scenarios 4 and 5, you can see that field 'CC_Reversed_Accruals' is only returning result if both the fields are part of Group By Clause.

 

 

I have following questions to understand this behavior.

 

 

1) Is this behavior related to star join used in the view?

2) Why Group by clause is required to get the result even if there is no aggregation? ( no measure is used to derive these 2 flags as well)

3) Both of the flags are created at star join  node only. Then, why is this behavior specific to one field only?

 

 

have someone faced this issue before?


Viewing all articles
Browse latest Browse all 1065

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>