Hi
I need to populate data into Master detail tables :-
Department ( Master ) and Employee ( Detail )
They get data from a table called " EmpData " . I need a PL/SQL procedure that fills the data simultaneously into Department and Employee at the same time .
The Data of " Emp Data " is
Empno EmpName Sal DeptNo DeptName DeptLoc
--------------------------------------------------------
101 John 1000 10 Finance London
102 David 1500 10 Finance London
103 Alice 5000 20 Sales Paris
104 Mike 3000 20 Sales Paris
105 Greg 2000 30 Production Rome
106 John 6000 40 Personnel Berlin
I need to a PL/SQL procedure to populate data like this
" Employee " Table (Detail )
Empno EmpName Sal DeptNo
--------------------------------
101 John 1000 10
102 David 1500 10
103 Alice 5000 20
104 Mike 3000 20
105 Greg 2000 30
106 John 6000 40
"Department " Table (Master)
DeptNo DeptName DeptLoc
---------------------------------
10 Finance London
20 Sales Paris
30 Production Rome
40 Personnel Berlin
Could some one please suggest the code
thanks
I need to populate data into Master detail tables :-
Department ( Master ) and Employee ( Detail )
They get data from a table called " EmpData " . I need a PL/SQL procedure that fills the data simultaneously into Department and Employee at the same time .
The Data of " Emp Data " is
Empno EmpName Sal DeptNo DeptName DeptLoc
--------------------------------------------------------
101 John 1000 10 Finance London
102 David 1500 10 Finance London
103 Alice 5000 20 Sales Paris
104 Mike 3000 20 Sales Paris
105 Greg 2000 30 Production Rome
106 John 6000 40 Personnel Berlin
I need to a PL/SQL procedure to populate data like this
" Employee " Table (Detail )
Empno EmpName Sal DeptNo
--------------------------------
101 John 1000 10
102 David 1500 10
103 Alice 5000 20
104 Mike 3000 20
105 Greg 2000 30
106 John 6000 40
"Department " Table (Master)
DeptNo DeptName DeptLoc
---------------------------------
10 Finance London
20 Sales Paris
30 Production Rome
40 Personnel Berlin
Could some one please suggest the code
thanks