Don't display lines longer than 80 characters : Utility Procedure « Function Procedure Packages « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> CREATE OR REPLACE PROCEDURE println (val IN VARCHAR2)
  2  IS
  3  BEGIN
  4     IF LENGTH (val) > 80
  5     THEN
  6
  7        DBMS_OUTPUT.PUT_LINE (SUBSTR (val, 1, 80));
  8
  9        println (SUBSTR (val, 81));
 10
 11     ELSE
 12
 13        DBMS_OUTPUT.PUT_LINE (val);
 14
 15     END IF;
 16
 17  EXCEPTION
 18
 19     WHEN OTHERS
 20
 21     THEN
 22
 23        DBMS_OUTPUT.ENABLE (1000000);
 24
 25        println (val);
 26  END;
 27  /

Procedure created.

SQL>








27.28.Utility Procedure
27.28.1.Don't display lines longer than 80 characters
27.28.2.Create procedure for displaying long text line by line
27.28.3.Procedure create_order
27.28.4.A package to calculate your age
27.28.5.Disable trigger
27.28.6.Returns the total from an order number being passed in.
27.28.7.Dynamically perform any DDL statements from within your normal PL/SQL processing.
27.28.8.Execuate the same SQL in two ways: static way and dynamic way