This discussion is archived
8 Replies Latest reply: Nov 9, 2012 3:57 PM by Gary Graham RSS

SPOOLing in sql developer does not take into consideration SET ECHO OFF

922042 Newbie
Currently Being Moderated
I'm running SQL Developer 3.1.07.42 on Windows 7 64 bit with java 1.7

I have the following very simple script just to show the problem:
SET ECHO OFF;
SET FEEDBACK OFF;
SET SERVEROUTPUT ON;
SET VERIFY OFF;
SET PAGES 0;
SET HEAD OFF;

SPOOL c:\test.sql
SELECT 1, 2, 3 FROM DUAL;
SPOOL OFF;
/
if I run it in TOAD 10.6.0.42 it creates the file with
         1          2          3
This is as expected (by me)
if I run the exact same query in SQL Developer 3.1.07.42 , it creates the file with:
< SELECT 1, 2, 3 FROM DUAL
1 2 3
(the < above is actually ">" but the CODE formatting software is screwing ">")
but I don't want the ECHOed command to be spooled. For the life of me, I cannot find a way to disable the ECHO from spooling in sql developer.
Tried the same in 3.0.4 and 2.1.1 with the same (bad) result (plus some warning on some of the unsupported SET commands).

Am I missing something obvious? Cause like this, the spool command cannot be used in sql developer to generate a CSV file for example, because of the echoed command. And windows doesn't come with SED by default so that is out. (plus that my original script is integrated into a much larger and complex set of scripts and the main script using them is executed from SQL Developer as a company policy (so that everybody uses the same tool and the code runs the same for everybody))

Any ideas/suggestions are welcome
Thanks.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points