Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Fetching records matching condition in a master-detail relation

Fetching records matching condition in a master-detail relation

From: <dwarakv_at_hotmail.com>
Date: 1998/04/20
Message-ID: <6hh87u$fg8$1@nnrp1.dejanews.com>#1/1

Hi,

   I have a form with a master-detail blocks. I have the user logging into the application using his/her private code(user_id). When the user performs a query on the master block, I would like him/her to see only the people associated with him. For e.g., I have users 1, 2. The people associated with user 1 are 6, 7, 8. Those associated with 2 are 9, 10, 11. When user 1 performs a query, he should be able to see only the records corresponding to people 6, 7, 8 and he should NOT be able to see anything relating to people 9, 10, 11. I do have an LOV which lets user 1 select only from people 6, 7, 8. But if the user hits F8, the query shows all the people, namely, 6, 7, 8, 9, 10, 11. Is there some way I can do this? I tried assigning to the where clause of the master block this condition (master_block.user = user_id, but when I try to query, I get error FRM-40505 (unable to perform query)).

  I have a second related question. I have different fields in the detail block. One of the fields is a status field which tells if the person is in the company or not. When doing the query, I don't need the query to show people who are no longer in the company. For e.g in the above example itself, if person 8 was terminated, when user 1 does a query he should see only people 6, 7 and NOT 8.

Thanks
Dwaraka

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Mon Apr 20 1998 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US