Subject Re: [firebird-support] Recursive SQL-Question
Author
Hi,
 
how looks like your table relation about nodes?
Is this plain text like ‘1.2.1’ or you have structural relation like PARENT_ID?
 
regards,
Karol Bieniaszewski
 
Sent: Thursday, August 06, 2015 12:25 PM
Subject: [firebird-support] Recursive SQL-Question
 
 

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