Create procedure for displaying long text line by line : Utility Procedure « Function Procedure Packages « Oracle PL/SQL Tutorial






SQL>
SQL> create or replace procedure printLongText ( p_str in varchar2 )
  2  is
  3     l_str   long := p_str;
  4  begin
  5     loop
  6        exit when l_str is null;
  7        dbms_output.put_line( substr( l_str, 1, 250 ) );
  8        l_str := substr( l_str, 251 );
  9     end loop;
 10  end;
 11  /

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