Home » SQL & PL/SQL » SQL & PL/SQL » basic PL/SQL question about recursive procedure..
basic PL/SQL question about recursive procedure.. [message #432148] Sun, 22 November 2009 01:49 Go to next message
ajitnayak
Messages: 1
Registered: November 2009
Junior Member
I have two tables as follows...

Table 1
Person ID
Person Name

Table 2
Person ID for person 1
Person ID for person 2
Relationship Desc (between Person 1 and Person 2)


I want to know how to write a procedure that is recursive given any two person ID's and lists all relationships existing between the two persons

For example
Person 1 dates Person 2
Person 1 is a cousin of Person 3,
Person 3 is the boss of Person 2
...

I want to know how to write a driver block that goes through all entries in Table 1 invokes the recursive procedure above.

I am expecting table/index/constraint DDL and fully functional PL/SQL DDL as part of this assessment.



thanks,
Ajit.
Re: basic PL/SQL question about recursive procedure.. [message #432150 is a reply to message #432148] Sun, 22 November 2009 02:26 Go to previous message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
I am expecting table/index/constraint DDL and fully functional PL/SQL DDL as part of this assessment.

I am expecting YOU provide a working Test case: create table and insert statements along with the result you want with these data.

Please read OraFAQ Forum Guide.

Study Hierarchical Queries

Regards
Michel
Previous Topic: Update cannot do in procedure
Next Topic: Update a 2nd table using trigger on the first
Goto Forum:
  


Current Time: Sun Dec 11 08:10:36 CST 2016

Total time taken to generate the page: 0.28066 seconds