Se evt. eks. i ibDatabase - funktionen: repealDocStruc 

update docstrucrel set dateto = '10-01-2001' 
where iddocstrucf in 
( SELECT iddocstrucf FROM docStrucRel 
START WITH idDocStrucF = 749638 
CONNECT BY PRIOR idDocStrucF = idDocStrucT 
AND PRIOR idDocStrucT != PRIOR idDocStrucF 
AND level < 30);

PLSQL Angående PRIOR se side 322 og 683-684

Brugt i IB databasen

1  SELECT iddocstrucf,iddocstruct FROM docStrucRel
2  START WITH idDocStrucF = 749638
3* CONNECT BY PRIOR idDocStrucF = idDocStrucT
SQL> /

  IDDOCSTRUCF IDDOCSTRUCT

----------- -----------

 749638      749624
 749639      749638
 749640      749639
 749641      749638
 749642      749638
 749643      749638
 749644      749638
 749645      749638
 749646      749638
 749647      749646
 749648      749646
1124040      749638

  12 rækker er valgt.

 

SQL> SELECT iddocstrucf,iddocstruct FROM docStrucRel
 where idDocStruct = 749638;

  IDDOCSTRUCF IDDOCSTRUCT

----------- -----------
 749639      749638
 749641      749638
 749642      749638
 749643      749638
 749644      749638
 749645      749638
 749646      749638
 1124040      749638

8 rækker er valgt.