cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Recursive SQL in SAP Hana

12-01-2016 5:13 PM
kapil_tilwani Product and Topic Expert
2118 views 0 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi,

it is possible execute a recursive SQL command? CTE or something else?

I want to calculate multiple columns, each based on the previous column...

Thanks!

0 Likes
View Entire Topic
kapil_tilwani
Product and Topic Expert
Product and Topic Expert

Hi,

SAP HANA supports CTE but not recursive SQL (no DECODE too).

The only way to do this is via SQL Script table variables (if restricted/defined in levels) procedural (Looping if indefinite levels or complex nesting rendering difficult maintenance in the future) or via separate Wrapper & Executor procedures.

Refer https://archive.sap.com/discussions/thread/3384059 for more information.

Regards,

Kapil