5 Replies Latest reply: Oct 22, 2012 2:01 PM by New Rodeo RSS

    I HAVE ENCOUNTERED A PROBLEM IN MODIFYING THE DEPARTMENTS REPORT

    Godis-Tei
      I am a new learner database developer. I am now using Oracle 11g. Following the Developer tutorial on MODIFYING THE DEPARTMENTS REPORT I have encountered the following problem.

      Scroll down to Source, and replace the default Region Source script with the
      following:
      SELECT d.DEPARTMENT_ID,
      d.DEPARTMENT_NAME,
      (select count(*)from oehr_employees where department_id = d.department_id)
      "Number of Employees",
      substr(e.first_name,1,1)||'.'||e.last_name "Manager Name",
      c.COUNTRY_NAME "Location"
      FROM OEHR_DEPARTMENTS d,
      OEHR_EMPLOYEES e,
      OEHR_LOCATIONS l,
      OEHR_COUNTRIES c
      WHERE d.LOCATION_ID=l.LOCATION_ID
      AND l.COUNTRY_ID=c.COUNTRY_ID
      AND d.DEPARTMENT_ID=e.department_id
      AND d.manager_id=e.employee_id
      AND instr(upper(d.department_name),upper(nvl(:P2_REPORT_
      SEARCH,d.department_name)))>0

      6. Click Apply Changes.
      7. Click Apply Changes to confirm.
      8. Right-click Departments and select Edit Report Attributes.
      9. Click the Edit icon next to Number of Employees.
      10. Under Column Definition, select center for Column Alignment.
      11. Click Apply Changes.

      When I did it there was an error message as follows:

      ErrorRegion Source

      Query cannot be parsed, please check the syntax of your query. (ORA-00909: invalid number of arguments)+
      Unable to show report.

      Below is the syntax that was to be replaced:

      select
      "DEPARTMENT_ID",
      "DEPARTMENT_NAME",
      "MANAGER_ID",
      "LOCATION_ID"
      from "OEHR_DEPARTMENTS"

      Now; how should I correct it? I cannot move forward

      Regards

      DAVID GODIS-TEI
      Ghana