master-Detail [message #640000] |
Tue, 21 July 2015 04:26 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/162e216f329427776c437d2638523b1d?s=64&d=mm&r=g) |
sanodani
Messages: 98 Registered: October 2014
|
Member |
|
|
Hallo all...
I am getting a Problem regarding Master-Detail block..
I have one master-block and 3 detail-blocks.
In my detail block1, i would like to display just those records which match my search criteria, not the others, even the control block object has many other records.
in my case: when i choose rcode=ct1 in my control-block then it should display (in detail-block1) just the record where class = 'MP' or 'SP'
Quote:control block:
rcode
Detail block1:
field
desp
Sub
Detail block2:
email
my tables:
create table TT1 (
rc varchar2(20),
usr varchar2(20)
);
create table TT2 (
rc varchar2(20),
rst number,
field varchar2(20),
def varchar2(20)
);
create table TT3 (
rc varchar2(20),
class varchar2(20),
rst number
);
create table TT4 (
rc varchar2(20),
email varchar2(80)
);
----------------
insert into TT1 values ('ct1', 'mno');
insert into TT1 values ('pt1', 'pqr');
insert into TT2 values ('ct1',1, 'word', 'read text');
insert into TT2 values ('ct1',2, 'excel', 'write text');
insert into TT2 values ('ct1',3, 'word', 'make text');
insert into TT3 values ('ct1', 1, 'MP');
insert into TT3 values ('ct1', 2, 'SP');
insert into TT3 values ('ct1', 3,'BD');
insert into TT3 values ('ct1', 4,'AB');
insert into TT4 values ('ct1', 'abc@abc.com');
which trigger should i use or where should i use this trigger or any other idea?
can anyone please have some idea/suggestion?
thankx in advance
regards,
|
|
|
|
|
|
|
Re: master-Detail [message #640172 is a reply to message #640094] |
Thu, 23 July 2015 05:02 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
The way you put it, it doesn't work as the master-detail relationship because it doesn't take care about master block's value. Whatever you put into master block and execute query, detail block will use your ONETIME_WHERE, and there's no reference to master block's item(s).
|
|
|