Recusrion
Posted in 1995
Topics: General Discussion
Hi, I am developing a routine to perform PARTS EXPLOSION i.e. recursion. I have problem in developing the code. The table for e.g is called CITIES. The fields are PARENT AND CHILD. The data will be : PARENT CHILD WORLD USA WORLD UK WORLD JAPAN USA CALIFORNIA CALIFORNIA MILIPITAS UK ENGLAND ENGLAND LONDON Say I pass the variable USA to this procedure I must be able to get USA-CALIFORNIA-MILIPITAS. I must also be able to do it in reverse i.e. if I pass MILIPITAS I must be able to get MILIPITAS-CALIFORNIA-USA-WORLD. Can any one help me out in this on how to code this in SQL. Thanks. letchu letchu@solectron.com