cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Recursive SQL in SAP Hana

Former Member
0 Likes
6,630

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!

Accepted Solutions (1)

Accepted Solutions (1)

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

Answers (0)