I'm trying to execute a script on SQL PLus, it's simple.
SET serveroutput ON;
DECLARE
mode NUMBER(1) := 1;
IF (mode = 1) THEN
prompt 'HERE'
END IF;
prompt 'fim'
I call the script from SQLPlus using sqlplus user/pw@db and @myscript.sql after a successful connection. But the output is strange for me:
Conectado a:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> @myscript.sql
9
10
11
And it continues to print this sequence indefinitely. What am I doing wrong?
hereprinted and nothing else unless you have something else in your script.myscript.sqlfile contains not terminated by/PL/SQL block.SQLPATHset in your environment?'/', your script contents as PL/SQL block will be never sent to oracle, and it waits showing number starting from last line number of ur script as you keep pressing Enter!