title: Oracle : receiving ORA-06550 and PLS-00905
body: <p>i have a holiday table which contains the data are</p>
  
  <pre><code>    HOLIDAYDA DESCRIPTION
     --------- --------------------
     19-JAN-11 to
     17-JAN-11 to
     10-JAN-11 new day
  </code></pre>
  
  <p>Now I want the first business day of the week.  IE: If I pass "12-JAN-2011" as input, I want the o/p as 11-JAN-2011 as the 1st business day because 10-JAN-2011 is holiday.</p>
  
  <p>here is my code : </p>
  
  <pre><code>create or replace procedure sample as
     l_dStartDay date;
     l_dHolidayDate date;
  begin
  
      select trunc(to_date(sysdate),'Day') 
        into l_dStartday 
        from dual;
  
   dbms_output.put_line('first day of the week ');
   dbms_output.put_line(l_dStartDay);
  
   for i in 2..5 Loop
     select holidaydate 
       from holiday 
       into l_dHolidayDate 
      where holidaydate = (l_dStartDay + i);
  
    if(l_dHolidaydate is null) then
      dbms_output.put_line(l_dStartDay+i);
    end if;
  exit;
  end loop;
  end;
  </code></pre>
  
  <p>i compiled the above program but with "<strong>Procedure created with compilation errors</strong>."</p>
  
  <p><strong>Newly Added : 
  Compliation errors :</strong></p>
  
  <pre><code> LINE/COL ERROR
   -------- -----------------------------------------------------------------
   9/1      PL/SQL: SQL Statement ignored
   9/33     PL/SQL: ORA-00933: SQL command not properly ended
  </code></pre>
  
  <p><strong>Error</strong>: </p>
  
  <pre><code>BEGIN sample; END;
        *
  ERROR at line 1:
  ORA-06550: line 1, column 7:
  PLS-00905: object SYSTEM.SAMPLE is invalid
  ORA-06550: line 1, column 7:
  PL/SQL: Statement ignored
  </code></pre>
  
  <p>can any one tell me the reason for the error? if possible tell me the solution?</p>