Skip to Content
0
Jun 29, 2022 at 10:00 PM

Retrieve hierarchical tree in Hana query

146 Views

How can I replicate Oracle's connect by level function in Hana?

SELECT t.cantidad+rownum VALOR, CASE WHEN t.cantidad+rownum = 0 THEN 'Contado' WHEN t.cantidad+rownum = 1 THEN t.cantidad+rownum||' Cuota' ELSE t.cantidad+rownum||' Cuotas' END DESCRIPCION FROM (SELECT -1 cantidad FROM DUAL WHERE -1 IS NOT NULL  )t connect by level <= 121;