|
|
Re: make a master and detail for the same table [message #173972 is a reply to message #173702] |
Thu, 25 May 2006 07:29 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
harpreetsinghkup
Messages: 52 Registered: May 2006 Location: Mumbai
|
Member |
|
|
making master-detail table for the same table is quite easy
i just give u the basic idea of ur query as i feel it is sufficient
for u and from that it is quite easy to explore further.
just follow these steps
1. use data block wizard and create the data block
2. then another time use the data block wizard to create the next data block of the same table
3. dont create the releationship now
4. u create the relationship manually to make it master detail
5. to prevent the insert of the master data block record
just create "on-insert" trigger on master block and type the "NULL"
inside the coding section
6. to further prevent the update,delete just create the triggers
on-update,on-delete and type the null;
this will enter just the one record of the detail block
and u can perform query on the master block
hope that it will help u
|
|
|