I am trying to capture the DDL for a procedure from a SQL*Plus job. It works however it removes any whitespace on the left.
making this:
IF SOMETHING
DO THIS;
ELSE
DO THAT;
END IF;
look like this:
IF SOMETHING
DO THIS;
ELSE
DO THAT;
END IF;
Does anyone know how to fix this?
_________________________________________________________________
ACCEPT Source_Schema CHAR PROMPT 'Source Schema: '
ACCEPT Object_Name CHAR PROMPT 'Object Name: '
SET PAGES 0
SET TRIMS ON
SET LONG 2000000
SET VERIFY OFF
SET LINESIZE 1000
SET TERMOUT OFF
SET FEEDBACK OFF
column ddl format a200 word_wrapped
connect username/password@SID
spool &&Object_Name..sql
SELECT DBMS_METADATA.GET_DDL('PROCEDURE',UPPER('&&Object_Name'), UPPER('&&Source_Schema')) || '/' ddl from dual;
SPOOL OFF