Hi, Not tested, but something in this direction could help:
Declare c cursor for With recursive px (S_ANCHOR, E_ANCHOR, dcl_found) as ( select startanchor, endanchor, decode (LABEL, 'dcl', 'YES', 'NO') From annotation, timit Where type = 'phn' and label = 'hv' and annotation.annotationid = timit.annotationid union all select s_anchor, endanchor, decode (LABEL, 'dcl', 'YES', 'NO') from px, annotation, timit where e_anchor = annotation.startanchor and annotation.annotationid = timit.annotationid ) select annotationid from annotation, px where startanchor = s_anchor and endanchor = e_anchor and dcl_found = 'YES' please let us know, if this is according to your needs but I think, no matter how many annotations are on the path, if somewhere in the middle/at the end 'dcl' will be found, the starting-annotationid will be output Elke SAP Labs Berlin > -----Ursprüngliche Nachricht----- > Von: F.mangiacrapa [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 20. Februar 2006 12:51 > An: maxdb@lists.mysql.com > Betreff: Extended probelem for With recursive and inline view > > Hi, > > thanks for the generosity > > there is in attached zip file.doc with the extended problem WITH > recursive > and inline view! > > > you can help me? > > > > THANKS FRANCESCO > -- > Email.it, the professional e-mail, gratis per te: http://www.email.it/f > > Sponsor: > Scopri come proteggere dai virus il tuo computer e come eliminare > ogni tipo di virus! - clicca qui > Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3212&d=20060220 -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]