How to Use Recursion in Forms Builder? [message #331359] |
Thu, 03 July 2008 02:16 |
rania$$
Messages: 11 Registered: July 2008
|
Junior Member |
|
|
I have the following table
Table name: Project_Details:
Coulmns:
Project_num Number(6) PK
Project_Title
Project_status
Parent_project_Number Number(6) FK (It’s a foreign key for
the project number in the same table)
Am using the Oracle Forms Builder to develop the following screen with the following data
Project Number: ……….
Parent Project Number: ……..
Childs Projects:
----------------
----------------
----------------
I have the following case that I don’t know how to implement:
Example:
The user create the following Project Numbers
Project number: 100 >>> Original or parent
New project 105 >>> Child of 100
New project 107 >>> Child of 105
New project 109 >>> Child of 107
So when the user re query 100 the Childs project filed should have 105,107 and 109 as a recursion of parents as shown below.
Screen Result:
Project Number: 100
Parent Project Number :
Childs Projects:
105
107
109
Another query with project number =107
Screen Result:
Project Number: 107
Parent Project Number : 105
Childs Projects:
105
100
If any body has any idea in how to implement this idea using oracle forms and SQL please help me its urgent..
Thanks in advanced..
|
|
|
|
Re: How to Use Recursion in Forms Builder? [message #345038 is a reply to message #331543] |
Tue, 02 September 2008 03:34 |
|
rania$$ wrote on Tue, 02 September 2008 07:39 | Dear Wency,
I saw your reply in my post
http://www.orafaq.com/forum/m/331359/126499/#msg_331359
but i didn't gei it how can i craete 3 blocks Project Number, Parent Project Number, and Childs Projects???
Shall i create them form the sme table because all of those information are in the same table..
Please I need your help on that..
|
Yes, from same table.
1. Try to make first block, this must be from query. The query must be distinct by Project_num.
2. Now create the second block from table.
3. In your first block, click on block's relations, click add, specify your detail block, that is your second block, and the join condition which is Project_num = Project_num.
[Updated on: Tue, 02 September 2008 03:36] Report message to a moderator
|
|
|