cancel
Showing results for 
Search instead for 
Did you mean: 

SQL window functions in HANA procedures

sudipDas
Explorer
0 Kudos

Hello

I am facing a problem when writing HANA Procedures.

I am trying to use the SQL window function LEAD / LAG  and PARTITION functions. But I am getting syntax errors on the same.

The same code ran successfully when I wrote in AMDP methods.

I believe the NATIVE SQL syntax should be same in AMDP or HANA Procedures. The code is given below. Please let me know where the things going wrong.

Below is the code -

Accepted Solutions (0)

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Looks to me as if there's a closing bracket missing for the DAYS_BETWEEN function.

- Lars

sudipDas
Explorer
0 Kudos

Hi Lars

Thanks for your answer. But that was not for the Bracket missing, That code is now running fine.

But I am getting strange errors, While I am doing inner join with 2 tables its activating , but when I  am using 3 tables in same select I am getting the error. My code and the error given below .

Could you plz help me out with troubleshoot.

Thanks in advance for the understanding.

sudipDas
Explorer
0 Kudos

HI Lars

Its done.. Thanks..