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

Re: Error while using Windows Function in SQL editor in SAP HANA

$
0
0

Ni Nikhil,

 

not sure what's wrong here, but I just tested this on a rev. 49 and it worked fine:

 

select version from m_database;

 

-- VERSION

-- 1.00.49.373159

 

 

createcolumntable t (class integer, val varchar (2) , offset integer)

 

insertinto t values (1, 'AA', 100);

insertinto t values (1, 'AB', 10);

 

insertinto t values (2, 'BA', 200);

insertinto t values (3, 'BB', 2000);

 

select class, val, offset,

  ROW_NUMBER() OVER  (partitionby class orderby val) as"row_num"

from T;

 

 

/*

CLASS   VAL OFFSET  row_num

1       AA 100     1     

1       AB 10      2     

2       BA 200     1     

3       BB 2.000   1     

*/

 

- 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>