Home » RDBMS Server » Server Administration » how to compile 'hello world' procedure
how to compile 'hello world' procedure [message #370086] Wed, 13 December 2000 04:13 Go to next message
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 Go to previous messageGo to next message
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
Re: how to compile 'hello world' procedure [message #370090 is a reply to message #370086] Wed, 13 December 2000 08:50 Go to previous messageGo to next message
venkat Veerareddy
Messages: 4
Registered: January 2000
Junior Member
Hi,

can you try this one

create or replace procedure hello_world is
begin
dbms_output.put_line('hello world !');
end hello_world;
/
Re: how to compile 'hello world' procedure [message #370096 is a reply to message #370086] Wed, 13 December 2000 11:08 Go to previous message
Muppet
Messages: 1
Registered: December 2000
Junior Member
Is it me, or does the first line in a PL/SQL procedure usually end in 'AS', not 'IS'?

Sorry if this has been covered before ...
Previous Topic: Re: returning binaries or blobs in ref_cursors
Next Topic: how to use raise_application_error?
Goto Forum:
  


Current Time: Wed May 01 21:00:41 CDT 2024