cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting date in HANA Models

vivekbhoj
Active Contributor
0 Kudos

Is there a way to sort date in HANA Modeling Views output?

Accepted Solutions (1)

Accepted Solutions (1)

rindia
Active Contributor
0 Kudos

Hi Vivek,

In Semantics (view output) there is no such option I found.

After activation of the view, if you do data preview, you can sort the date attribute by just clicking on it attribute once.

One alternate is to write SQLscript and use order by clause for date field.

Regards

Raj

Answers (2)

Answers (2)

rama_shankar3
Active Contributor
0 Kudos

You can use sort by key word with SQL to force the sort. An alternate approach is to embedd the sort within the calculation view if you use one so that always output of data is sorted.

Hope this helps.

Rama

former_member184768
Active Contributor
0 Kudos

Hi Vivek,

Did not understand your question correctly. Are you looking for ORDER BY clause on the date column in your output from HANA modeling views.

What exactly is your requirement ?

Regards,

Ravi

vivekbhoj
Active Contributor
0 Kudos

Hi Ravindra,

I was thinking is it possible to sort date using calculated column?

Secondly if i use SQL script is there a way to to display only first 5 sorted dates ?

i am working on a poc where i need first 5 employees based on date of joining

dibyajyoti_nanda
Participant
0 Kudos

hi Ravindra,

I have read one post in WIKI about the in memory technology ,

I am a bit confused that in regular data base technology we store data in secondary memory,

but here we are storing all the data in primary memory but how it is possible to store data in a volatile memory .would you please explain this ...

former_member184768
Active Contributor
0 Kudos

Hi Vivek,

I don't think you need Calculated attribute (unless you need it to convert the date column data from varchar to date).

You can use something like

SELECT top 5 * (or EMPLOYEE_NO) from <your HANA view> order by JOINING_DATE;

Regards,

Ravi

rindia
Active Contributor
0 Kudos

Hi Dibyajyoti Nanda,

This is already explained by Tomas. Please have a look at this thread http://scn.sap.com/thread/3363194

Regards

Raj

Former Member
0 Kudos

Hi Ravi,

so I want a view in which the data is already sorted. Is that possible?

Regards, Christoph.