Forum Stats

  • 3,757,175 Users
  • 2,251,204 Discussions
  • 7,869,751 Comments

Discussions

Line breaks in output of ords_export.export_module

Stephan Visser
Stephan Visser Member Posts: 5 Blue Ribbon
edited Oct 25, 2018 3:53PM in SQLcl

I am using sqlcl in a bespoke ci/cd setup and one of my scripts uses ords_export.export_module to get the module source code out of the database.

When this scripts saves the output (spool) of the command it leaves me with incorrect line breaks on longer lines so my automated process no longer works.

This is my export script:

set termout off

set heading off

set pagesize 0

set linesize 0

set long 100000

set longchunksize 100000

set trimout on

set trimspool on

set feedback off

set echo off

set sqlformat default

spool &1..sql;

select 'set define off;' from dual;

select ords_export.export_module('&2') from dual;

select '/' from dual;

select 'exit;' from dual;

spool off;

exit;

Is this a bug or am I doing something wrong?

Answers