Re: hierachal or tree type queries using OLWGS
Posted in 1997
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Joe Freeman wrote: > > We have a table which has parent_id pointer which points up to the same > table so that we can buld a tree of data in the table. (Each child > points to its parent). I'd like to write a query that finds a node in > the tree and all its decendants. Is there any support for this type of > query in informix? (I think Oracle and one of the MS products has > something called hierarchal cursors to do this) Correct Oracle has explicit extensions to SQL to support such "parts breakdown' type hierarchies. Informix does not. The only good solution using pure SQL is to create a GERAND, a link table which just contains the pairs of related keys and no other data, to implement the self join. Art S. Kagel