I'd like to represent a hierarchy in a table like
id name parent1 aaa null
2 bbb 1
3 ccc 1
4 ddd 3
is it possible to select reucursivly?
For example for id 4 I would like a result like this:
aaa-ccc-ddd
For id 3 like this:
aaa-ccc
I read in the ansi SQL forum oracle can do it using START WITH and CONNECT BY syntax
Does anybody know a solution in DB2
thorsten
id name parent1 aaa null
2 bbb 1
3 ccc 1
4 ddd 3
is it possible to select reucursivly?
For example for id 4 I would like a result like this:
aaa-ccc-ddd
For id 3 like this:
aaa-ccc
I read in the ansi SQL forum oracle can do it using START WITH and CONNECT BY syntax
Does anybody know a solution in DB2
thorsten