Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How could I use a window function median() in a sql console

Former Member
0 Kudos

Hi, everyone

I got an error message" feature not supported: not supported window function:" when I try to run a sql script in SPS08.

SELECT

  MEDIAN(DURA) OVER(PARTITION BY TIME2) as MedianValue,

    TIME2

FROM

(

SELECT

  TO_INT((HOUR(TIME_2)*60+MINUTE(TIME_2))/5) AS TIME2,

  DURA

FROM

  TRAFFIC.D26PAIRSCER

);

HANA gave me an error:  :

Could not execute 'SELECT MEDIAN(DURA) OVER(PARTITION BY TIME2) as MedianValue, TIME2 FROM ( SELECT ...' in 11 ms 603 µs .

SAP DBTech JDBC: [7] (at 8): feature not supported: not supported window function: line 2 col 2 (at pos 😎

according to the windows function page, it looks right.

Thanks a lot!

  • SAP Managed Tags:
1 ACCEPTED SOLUTION

lbreddemann
Active Contributor
0 Kudos

The MEDIAN aggregation is available as of SAP HANA SPS9.

- Lars

  • SAP Managed Tags:
4 REPLIES 4

Laszlo_B
Active Contributor
0 Kudos

Hello Shu,

if I understand correctly and the problem happens during HANA SQL development, this question might be sooner answered on the Space http://scn.sap.com/community/hana-in-memory, as that Space handles HANA-related questions.

Perhaps you want to post this question there too.

Best regards,
Laszlo

  • SAP Managed Tags:

Former Member
0 Kudos

Dear Laszlo Badovszky,

Yes, it happens when I am in the SQL command window:).

Thanks a lot.

Best regards,

Laszlo

  • SAP Managed Tags:

lbreddemann
Active Contributor
0 Kudos

The MEDIAN aggregation is available as of SAP HANA SPS9.

- Lars

  • SAP Managed Tags:

0 Kudos

Dear Lars,

Thank you. Now, I need to finish it in other ways.

Best,

Shu

  • SAP Managed Tags: