Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: How to aggregate in Calculation View, but still output detail field

$
0
0

Hi Adam,

 

I'm not too sure about your exact requirements, but if you're using a calculation view anyhow, you could approach this in several ways:

 

1) Just write the classic SQL query for this kind of requirement.

Something like

select mat_cas.*
from mat_cases mat_cas 
where mat_cas."DATE" =          (select   min ("DATE") as min_date          from mat_cases mc          where  mc.material = mat_cas.material)

 

Obviously you'd have to think about what happens with rows of the same material, different case numbers and the same minimal date, but in principle this would be one option.

 

2) Another way would be to create a SQLScript function that delivers the minimal date for a given MATERIAL.

This function can then be used in a scripted calcview to mimic the behavior of the SQL above.

 

For anything more specific, you'll need to tell us how your output should look like.

 

- Lars


Viewing all articles
Browse latest Browse all 9165

Trending Articles



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