Skip to Content
0

Recursive SQL in SAP Hana

Dec 01, 2016 at 09:53 AM

808

avatar image
Former Member

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!

SQL
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member
Dec 01, 2016 at 04:13 PM
1

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

Share
10 |10000 characters needed characters left characters exceeded