Welcome Guest, you are in: Login

devio dbscript ScrewTurn Wiki

RSS RSS

Navigation





Search the wiki
»

PoweredBy

Page History: OE DEPTVIEW (view)

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: 2010/06/24 07:59


wikibot

ViewOE.DEPTVIEW

Source

CREATE OR REPLACE VIEW OE.DEPTVIEW AS 
SELECT xmlelement("Department", xmlForest(department_name, location_id),
       (SELECT sys_xmlagg(xmlelement("Employee",xmlForest(last_name,
                                                           job_id,manager_id,
                                                           hire_date,
                                                           salary,
                                                           commission_pct)
                                    ), xmlformat('EmployeeList'))
        FROM employees e WHERE e.department_id = d.department_id
       )) xml
FROM departments d

References

Dependency TypeObject TypeReferenced Object
SelectTableHR.DEPARTMENTS
SelectTableHR.EMPLOYEES

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam.