1 Reply Latest reply: Feb 19, 2013 6:45 PM by scott.wesley RSS

    Information about :P2_REPORT_ SEARCH

    991976
      Hello,

      I am new APEX, i don't know what ":P2_REPORT_ SEARCH" is doing in the below query. Why it is used and when to use?

      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