Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    13

    Unanswered: Spool file without select statements appearing?

    Hi all,

    I need to spool output. However, I do not want the query to appear in the output.

    Ok... So I am burned out a little. I have pages and pages worth of a query that's ready to go except.... I have a question about spooling. I am using SQL*Plus through Oracle 8 client... The server has Oracle 10g.

    Now, the result appears even after I set feed off, set term off, set ver off, set echo off, etc.... I receive a few rows. Good - I want the output. However, I do not want the SQL. The select statements appear in the output as well. I don't want others to see the select statements if they are running it. I just want them to see the output - the few rows that the query produced.

    What am I missing? Is there anything that can be done?

    Thanks,
    SFoster

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    You were close to the solution - SET ECHO OFF might help you. There are two ways to use it: first one is using it directly at the SQL*Plus prompt (which will NOT do what you want), and the other one - helpful one - is running the whole thing from the .SQL script.

    Therefore, if you create a script file (let's call it "example.sql"), such as

    SET ECHO OFF;
    SPOOL example.txt
    SELECT * FROM dept;
    SPOOL OFF;

    and run it as

    SQL> @example.sql

    you'll get desired output in the "example.txt" file and it will not have the SELECT statement listed in it.

    There might be another solution, but I don't know it ...

  3. #3
    Join Date
    Jul 2004
    Posts
    13

    Thank you!

    Thank you for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •