-
Hello.
I'm trying to execute my first PL/SQL script on Oracle 8i:
sqlplus system/manager @myscrypt.sql
myscript.sql:
-----------
declare
my_age NUMBER;
begin
select AGE into my_age from PUPILS where name='John';
dbms_output.put_line('AGE: ' || my_age);
end;
----------
But I get this:
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
JServer Release 8.1.7.0.0 - Production
12
And the cursos blinks just after '12', but nothing happens.
What am I doing wrong?
Thank you very much.
========
LARRY ELLISON
-
At the end of the script, add one more line which contains only one symbol:
How about now :-)
Oracle Certified Master
Oracle Certified Professional 6i,8i,9i,10g,11g,12c
email: ocp_9i@yahoo.com
-
Does not work
Thank you, Julian, for your answer.
I changed my script:
....
end;
/
But it still does not work. The cursor blinks after '12'.
========
LARRY ELLISON
-
It works
I'm sorry.
I forgot to save my script. Now it works, but it does not print anything.
Is 'put_line' command the right one?
Thank you very much.
========
LARRY ELLISON
-
Re: It works
Originally posted by l-ellison
I'm sorry.
I forgot to save my script. Now it works, but it does not print anything.
Is 'put_line' command the right one?
Thank you very much.
Before declare add a new/first line
Code:
set serveroutput on
Oracle Certified Master
Oracle Certified Professional 6i,8i,9i,10g,11g,12c
email: ocp_9i@yahoo.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|