Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 5653

search without aggregation, grouping by expression error

$
0
0

Hi All,

We are on HANA SP8 version.

I am aware that we cannot select directly from analytical view with out grouping by.

 

My requirement was to join the analytical view with a temp table to filter some records and then do aggregation .

 

Below query is failing with

feature not supported: not allowed over OLAP VIEW : search without aggregation, grouping by expression other than view column or user defined function with string type

ALERT_NEW - analytical view

TMP_SELECTION_FILTER - physical temp table

 

Query: 

SELECT

A.DDDD_ID, A.PRODUCT_ID, A.CAPTURE_DATE ,

COUNT(DISTINCT (A.CAPTURE_DATE)) AS PINDAYS

 

FROM "ALERT_NEW"as A

 

inner

join"TMP_SELECTION_FILTER"AS SF

ON SF.EPH_ID = A.SELECTION_ID

AND

A.VALID_ALERT = 'Y'

GROUP

BYA.DDDD_ID, A.PRODUCT_ID, A.CAPTURE_DATE;


But if I remove the distinct in the count , query is working

Query:

SELECT

A.DDDD_ID, A.PRODUCT_ID, A.CAPTURE_DATE ,

COUNT(A.CAPTURE_DATE) AS PINDAYS

 

FROM "ALERT_NEW"as A

 

inner

join"TMP_SELECTION_FILTER"AS SF

ON SF.EPH_ID = A.SELECTION_ID

AND

A.VALID_ALERT = 'Y'

GROUP

BYA.DDDD_ID, A.PRODUCT_ID, A.CAPTURE_DATE;



Any idea why distinct is causing the issue. I still need to get the distinct count .


Regards,

Suman.


Viewing all articles
Browse latest Browse all 5653

Trending Articles



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