Maison > Article > base de données > oracle pl/sql 本地打印html报表
将打印到output的过长一行句子,自动截断成几行,用来打印本地报表: from http://hgworkhouse.org PL/SQL 报表打印 Oracle Procedure my_output(p_text in varchar2) is p_sum_length number := 0; p_length number := 200; p_index number := 1; p_time numb
将打印到output的过长一行句子,自动截断成几行,用来打印本地报表: from http://hgworkhouse.org PL/SQL 报表打印 OracleProcedure my_output(p_text in varchar2) is p_sum_length number := 0; p_length number := 200; p_index number := 1; p_time number := 0; begin select length(p_text) into p_sum_length from dual; p_time := ceil(p_sum_length / p_length); for i in 1 .. p_time loop dbms_output.put_line(substr(p_text, p_index, p_length)); p_index := p_index + p_length; end loop; end my_output;