Hi
I have an " employee " table with empno, empname , deptno, deptname fields.
However in the employee table , all employees have
deptnos , but not all of them have deptnames
There is a " department_backup " table with deptno and deptname . ( This table is not same as department table )
It does not have all the records in department table ,
but most of them ( about 90 % ).
I need to create view , which fetches empno, empname, deptno, deptname from employee.
In case deptname for an employee does not exist , then that corresponding deptname for a deptno is fetched from the " department_backup " table .
Could some one please suggest a code to create the view
Thanks
I have an " employee " table with empno, empname , deptno, deptname fields.
However in the employee table , all employees have
deptnos , but not all of them have deptnames
There is a " department_backup " table with deptno and deptname . ( This table is not same as department table )
It does not have all the records in department table ,
but most of them ( about 90 % ).
I need to create view , which fetches empno, empname, deptno, deptname from employee.
In case deptname for an employee does not exist , then that corresponding deptname for a deptno is fetched from the " department_backup " table .
Could some one please suggest a code to create the view
Thanks