how to compile 'hello world' procedure [message #370086] |
Wed, 13 December 2000 04:13 |
Jean-Paul Le Fèvre
Messages: 1 Registered: December 2000
|
Junior Member |
|
|
I've just spent 4 of 5 hours trying to write and
execute an 'hello worl' procedure :
create or replace procedure hello_world is
begin
dbms_output.put_line('hello world !');
end try;
/
When I enter these lines I got :
Warning: Procedure created with compilation errors.
When I try to execute hello_world I got :
BEGIN hello_world; END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00905: object EROS.HELLO_WORLD is invalid
Could you tell me what is wrong in this f*ing proc !
Thank you.
|
|
|
Re: how to compile 'hello world' procedure [message #370088 is a reply to message #370086] |
Wed, 13 December 2000 08:31 |
Shanthi Ramayanapu
Messages: 22 Registered: October 2000
|
Junior Member |
|
|
create or replace procedure hello_world is
begin
dbms_output.put_line('hello world !');
end try;
In the above code, you used end try;
END associated with a name should be the procedure name, so change end try to
END hello_world;
Also, if you need to see the compilation errors, at SQL prompt type
select * from user_errors;
This will show you all the errors occured.
To compile procedure at SQL prompt
either type the procedure again and in the end type /
or
save the procedure to a file and at prompt @filename
To execute the procedure at prompt
execute hell_world ie
execute procedurename.
Shanthi
|
|
|
|
|