Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-06550 with stored procedure

456978Dec 1 2005 — edited Dec 2 2005
Any ideas on this error?

Tried to create procedure first:
SQL> start c:\cs603\enter_website.sql
Warning: Procedure created with compilation errors.


Then with exec I get this:
SQL> exec enter_website('u1','p1');
BEGIN enter_website('u1','p1'); END;
*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00905: object TEST.ENTER_WEBSITE is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


Here is the procedure code:

create or replace procedure enter_website(u, in users uname%type, p in users.pname%type) as
set serveroutput on size 1000000 format wrap
declare
usercount, pagecount number;
begin
select COUNT(*) into pagecount
from pages where p = pname;
if pagecount = 1 then
select COUNT(*) into usercount
from users where u = uname;
if usercount = 0 then
insert into users values (u, p, ‘a’, 1);
else
update users set status = ‘a’ where u = uname and p = pname
end-if
else
dbms_ouput.put_line(‘Page does not exist.’);
end-if

end;
/



Any thoughts?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 30 2005
Added on Dec 1 2005
11 comments
708 views