Results 1 to 9 of 9
  1. #1
    Join Date
    May 2003
    Posts
    58

    Unanswered: suppress display

    Hello, Can somebody please tell how to suppress the query result in sql*plus? I need something to work like unix re-direction operator. i.e I want to issue a select statement and send the results (rows) to a file. They should NOT be displayed on screen. I am using spool to do so, but need help with suppressing the results. Thanks in advance.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    sqlplus -s
    works for me
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    May 2003
    Posts
    58
    Can you explain what sqlplus -s means?

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Can you explain what sqlplus -s means?
    You HAVE to be a Windoze user,
    where all you know how to do is point & click. :-(
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    May 2003
    Posts
    58
    Thanks for the reply.

    I used the following
    set verify off
    set heading off
    set linesize 6000
    set feedback off
    set termout off
    set term off
    spool out1.txt

    I used sqlplus -s option. It suppressed the screen display but not the query result. The records displayed as usual. Is there anything else that I should add to the above? Thanks again.

  6. #6
    Join Date
    Dec 2003
    Location
    Oklahoma, USA
    Posts
    354
    Try the SET FLUSH OFF setting.

    JoeB

  7. #7
    Join Date
    Jan 2004
    Location
    Germantown, MD
    Posts
    34
    Originally posted by chatguy2020
    Thanks for the reply.

    I used the following
    set verify off
    set heading off
    set linesize 6000
    set feedback off
    set termout off
    set term off
    spool out1.txt

    I used sqlplus -s option. It suppressed the screen display but not the query result. The records displayed as usual. Is there anything else that I should add to the above? Thanks again.
    BTW - term and termout are the same thing... All of your above params can be abbreviated as follows: veri, head, line, feed, term, etc.

    Also, most params can be abbreviated with 3 letters instead of 4.

    -Rip
    "The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing. "
    - Albert Einstein

  8. #8
    Join Date
    Mar 2004
    Posts
    19
    You probably did not use SPOOL option this time.
    The Query Output gets redirected to Spool File.
    -------------
    Pragati Swain

  9. #9
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    /tmp> cat a123.sql
    set pause off echo off term off verify off serveroutput off pages 66 feedback off lines 255 trimspool on
    spool a123.log
    @time
    select sysdate from dual;
    spool off
    exit

    /tmp> sqlplus -s scott/tiger @a123.sql

    /tmp> cat a123.log

    SYSDATE
    --------------------
    2004-MAR-29:14:44:41
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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