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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Avoid Duplication in Master Table

420648Jun 4 2007 — edited Jun 10 2007
Hi,

With regards to form’s master detail relation ship application I created two tables that are “department” as master table and “employee” as a detail and deptno is the field which may establish relationship b/w these two tables on forms.
There are three fields on “department” block (deptno (pk), dname, location)
And four fileds on “employee” block (empno, ename, deptno (fk), salary).
I am using sequence to generate deptno in “department” table.

Suppose there is one record in the “department” table that is
(1, Finance, Malta) and one record in “employee” table that is
(001, Mark, 1, 4000).

Now I wanted to insert another record in the “employee” table through the form application, that is (002, Robert, 1, 5000), which belongs to the same single record in the “department” table.

So on run time form query the record from “department” table that has only one record and then I enter the new second record in “employee” table then click save,
I am wondered to see that form also save the same record in the “department” table that is (2, Finance, Malta), along the new second record in “employee” table.

That’s duplicate the record in “department” table.
How should we avoid this duplication so only the new record inserted into the “employee” table against the single record in “department” table?

Examples will be highly appreciated.

Thanks

Benazir
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 8 2007
Added on Jun 4 2007
33 comments
2,591 views