Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating a form to display different tables data using compound key table

628665Mar 24 2008 — edited Mar 28 2008
Hello

I am currently stuyding the ORACLE forms element of databases and ORACLE imparicular.

I am currently struggling with an issue I have currently.

My SQL is as below

DEPT
DEPTNO number(2) primary key,
DNAME Varchar2(30) not null;

PROJ
PROJNO number(3) primary key,
PROJNAME Varchar2(30) not null,
DEPTNO number(5) references dept (deptno),
MGREMPNO references emp (empno));

EMP
EMPNO number (5) primary key,
nin CHAR(20) not null,
NAME CHAR(30) not null,
SAL Number(6,2),
hiredate Date,
DOB Date);

PROJ_ASS
EMPNO Number references emp(empno),
PROJNO Number(3) referencesproj (projno)
Primary key (empno,projno));

What i am trying to achive is that when I type in the project number then it displays the project information and all the employee's assosiated with it.

I am not trying to do a quick fix and I want o be able to understand not just to get it work but how it happens.

I am okay at SQL owever untrained at using forms and I am hoping with some pointers, and also some usefull documentation people maybe able to point me in the direction off... I can get this working??

I think I may need an LOV or a trigger?

I have the data blocks all set up with the relations reflected in the SQL above

Whats throwing me is that there is no direct reference from the PROJ table to the EMP table so I hav eto use the PROJ_ASS table - thats whats throwing me via the forms....

On the layout editor The fields from the PROJ datablock and EMP datablock - there is also a PROJ_ASS datablock with the relative relations. However when i do a search and get back the data for the relevant project why arn't all the related employees shownn in tabular form - The relations are there - so do I need a trigger to get them all listed??

Many Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 25 2008
Added on Mar 24 2008
2 comments
658 views