Search code examples
sqlrecursiontreeviewsap-ase

How to create a recursive path from sybase-ase db?


I have a problem I've previously solved with other DBMS but can't find a solution to run with Sybase-ASE 15.0. Is this possible with SQL (or Views) without custom StoredProcedures?

Input:

ID Name Parent
1  a
2  b    1
3  c    1
4  d    3

Output:

ID   PATH
1    a
2    a / b
3    a / c
4    a / c / d

Solution

  • Simple answer - No.

    How to get list of values in GROUP_BY clause?