No support for "qualified name"

Ivan C.

Member³
I should be able to execute this type of code from a SQL window:

Code:
<<outer>>
DECLARE
   v CHAR := 'A';
BEGIN
   DECLARE
      v CHAR := 'B';
   BEGIN
      dbms_output.put_line (outer.v);
   END;
END;
Instead, I'm getting an error message.

When I tried cutting and pasting it into the Command Window, still erroring out.

When I saved it into a file, and tried calling the file from the Command Window, didn't work either.

Can you please fix this?
Thank you in advance.
Ivan C.
 
Hello,
with SQL*PLUS it works :

[ rpmsdbp1 /home/oracle ]
RPMS_I01 oracle> cat > outer.sql

Code:
DECLARE
   v CHAR := 'A';
BEGIN
   DECLARE
      v CHAR := 'B';
   BEGIN
      dbms_output.put_line (outer.v);
   END;
END;
/
^D
[ rpmsdbp1 /home/oracle ]
 RPMS_I01 oracle> sqladm

SQL*Plus: Release 9.2.0.5.0 - Production on Thu Dec 9 07:28:23 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production

sys@RPMS_I01> ! ls
20041206      asp1.profile  bin           log           oraInventory  pdb.profile   rdb.profile   statspack
ak            asp2.profile  jobs          mq1.profile   oui           profiles      sh            tmp
ak.tar        asp3.profile  jre           net           outer.sql     python        sql           trace

sys@RPMS_I01> @outer

PL/SQL procedure successfully completed.

sys@RPMS_I01> set serveroutput on
sys@RPMS_I01> r
  1  <<outer>>
  2  DECLARE
  3     v CHAR := 'A';
  4  BEGIN
  5     DECLARE
  6        v CHAR := 'B';
  7     BEGIN
  8        dbms_output.put_line (outer.v);
  9     END;
 10* END;
A
 
Back
Top