can you post the entire package spec as well as the body?
also try this:

CREATE OR REPLACE PACKAGE BODY select_job_history
AS
   TYPE t_cursor IS REF CURSOR;

   PROCEDURE getjobhistorybyemployeeid(
      p_employee_id    IN       NUMBER,
      cur_jobhistory   OUT      t_cursor )
   IS
   BEGIN
      OPEN cur_jobhistory FOR
         SELECT *
           FROM employees
          WHERE employee_id = p_employee_id;
   END getjobhistorybyemployeeid;
END select_job_history;
/




On Thu, Sep 24, 2009 at 2:59 PM, R.F. <[email protected]> wrote:

>
> Hello,
> Can someone help me get this to compile. I get the ERROR at line 9:
> PLS-00103: Encountered the symbol "BEGIN" when expecting one of the
> following:
>
>   language
> 7. )
> 8. IS
> 9. BEGIN
> 10.     OPEN cur_JobHistory FOR
> 11.     SELECT * FROM employees
>
>
> CREATE OR REPLACE PACKAGE BODY SELECT_JOB_HISTORY AS TYPE T_CURSOR IS
> REF CURSOR ;
> PROCEDURE GetJobHistoryByEmployeeId
> (
>    p_employee_id IN NUMBER,
>    cur_JobHistory OUT T_CURSOR
> )
> IS
>  BEGIN
>      OPEN cur_JobHistory FOR
>      SELECT * FROM employees
>          WHERE employee_id = p_employee_id;
>  END GetJobHistoryByEmployeeId;
> END SELECT_JOB_HISTORY;
>
>
> Thanks in advance.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to