Subject Recursive SQL-Question
Author

I have a table in the database which represents a tree like the one below.

Each tree-node is a record in the table and has a primary-key.

 

1

 

 

 

1.1

 

 

 

1.1.1

 

 

1.1.2

 

1.2

 

 

 

1.2.1

 

 

1.2.2

2

 

 

 

2.2

 

 

 

2.2.1

3

 

 

 

3.1

 

 

 

3.1.1

 

Now I have a dataset which suspends only the green tree-nodes.

 

I need a SQL which suspends the complete tree-path for each green cell

 

1

 

 

 

1.1

 

 

 

1.1.2

 

1.2

 

 

 

1.2.2

3

 

 

 

3.1

 

 

How can this be done???


TIA,

Sepp