Informix and trees
Posted in 1997
Topics: General Discussion
hello, I am looking for an example to search in an database which has stored the data like a tree. The actual problem for example is a tree of production processid's (pid). The root of the tree is the material-id (pid). Every production process to change the material up to the productionoutput generates a new pid. Example: pid1 | --------------------------- | | | pid2 pid3 pid4 | | | | -------------- | | pid5 pid6 | | --------------------------------------- | | | | pid7 pid8 pid9 pid10 | | | | --------------------------------------- | pid11 For example I have got the pid8 and have to now all pid's before in the tree (pid 1 to 6). Sometimes it's enough to find the root. We are using the INFORMIX-SE environment. My questions: 1. how to build the table ? 2. how can I generate a simple select to get all affected pid's ? best regards Dirk Niemeier Hubert Stueken GmbH & Co. Rinteln-Germany