DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: PLS-00103: Encountered the symbol "end-of-file" in a PAckage

  1. #1
    Join Date
    Apr 2005
    Posts
    5

    PLS-00103: Encountered the symbol "end-of-file" in a PAckage

    Hi ,

    I am compiling this package.

    Code:
    CREATE OR REPLACE PACKAGE BODY Calendar_LastYrStatistics IS
    PROCEDURE LastYr_Statistics(pProperty In Varchar2,
                        pThisDate In Date,
                  pOccupied Out Number,
                  pSameDay Out Number) IS 
    
    vFromDate Date;
    BEGIN
    	vFromDate:=Add_Months(pThisDate,-12);
         BEGIN 
       	select Occupied,SameDay
    	into pOccupied, pSameDay
            from Daily_Stat 
      	where Property = pProperty 
     	and ThisDate = vFromDate;       
              
    	END;
    	Exception 
    	 WHEN OTHERS then 
    		pOccupied:=NULL;
    		:=NULL;
    END;
    /
    I get the foll error

    PLS-00103: Encountered the symbol "end-of-file" when expecting
    one of the following:
    begin end function package pragma procedure form

    Can someone please help me ?..
    Thanks
    Last edited by gandolf989; 04-28-2005 at 10:03 PM.

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166

    Re: PLS-00103: Encountered the symbol "end-of-file" in a PAckage

    Try this.

    Originally posted by oracledev
    Code:
    CREATE OR REPLACE PACKAGE BODY Calendar_LastYrStatistics 
    IS
       PROCEDURE LastYr_Statistics
       ( pProperty In  Varchar2,
         pThisDate In  Date,
         pOccupied Out Number,
         pSameDay  Out Number);
    END Calendar_LastYrStatistics;
    
    CREATE OR REPLACE PACKAGE BODY Calendar_LastYrStatistics 
    IS
       PROCEDURE LastYr_Statistics
       ( pProperty In  Varchar2,
         pThisDate In  Date,
         pOccupied Out Number,
         pSameDay  Out Number) 
       IS 
          vFromDate Date;
       BEGIN
          vFromDate:=Add_Months(pThisDate,-12);
    
          SELECT Occupied,SameDay
            INTO pOccupied, pSameDay
            FROM Daily_Stat 
           WHERE Property = pProperty 
             AND ThisDate = vFromDate;       
       Exception
          WHEN NO_DATA_FOUND THEN
             pOccupied :=NULL;
             pSameDay  :=NULL;
          WHEN OTHERS THEN
             RAISE;
       END LastYr_Statistics;
    END Calendar_LastYrStatistics;
    /

  3. #3
    Join Date
    Apr 2005
    Posts
    5
    Thanks ,

    it worked fine ....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width