Home » Other » Client Tools » sqlplus && DBMS_OUTPUT.PUT_LINE doesn't work ? (Oracle 12.2)
sqlplus && DBMS_OUTPUT.PUT_LINE doesn't work ? [message #678680] Fri, 27 December 2019 05:59 Go to next message
a100
Messages: 34
Registered: March 2019
Member
Hello all,
I am learning how to use DBMS_OUTPUT.PUT_LINE (it is supposed to be a simple isn't it ?) but when I run this query saved in file test_dual.sql:
DECLARE
  RES      VARCHAR2(50);
BEGIN
  SELECT 3+4 INTO RES FROM DUAL;
  DBMS_OUTPUT.PUT_LINE(RES);
END;
I get the following result:
SQL> @test_dual;
  7  /

PL/SQL procedure successfully completed.
Where is the real output of this ?
Re: sqlplus && DBMS_OUTPUT.PUT_LINE doesn't work ? [message #678682 is a reply to message #678680] Fri, 27 December 2019 06:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> DECLARE
  2    RES      VARCHAR2(50);
  3  BEGIN
  4    SELECT 3+4 INTO RES FROM DUAL;
  5    DBMS_OUTPUT.PUT_LINE(RES);
  6  END;
  7  /

PL/SQL procedure successfully completed.

SQL> set serveroutput on
SQL> /
7

PL/SQL procedure successfully completed.
Re: sqlplus && DBMS_OUTPUT.PUT_LINE doesn't work ? [message #678683 is a reply to message #678680] Fri, 27 December 2019 06:18 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

If you have red the link I posted you in your previous topic you'd know this.

[Updated on: Fri, 27 December 2019 06:21]

Report message to a moderator

Re: sqlplus && DBMS_OUTPUT.PUT_LINE doesn't work ? [message #678686 is a reply to message #678683] Fri, 27 December 2019 06:45 Go to previous message
a100
Messages: 34
Registered: March 2019
Member
Hi @Michel,
indeed - that was the solution ...
I am confused by different tools - some requires that clause - some don't ...
Previous Topic: connect sql developer without the tns file
Next Topic: Can not bangla supported in oracle
Goto Forum:
  


Current Time: Thu Mar 28 18:19:01 CDT 2024